1    | /* onode_versioned.h
2    |    -----------------
3    | 
4    |    Data structures for versioned onode forks,
5    |    keeps track of the revision log.
6    | 
7    |    $Id: onode_versioned.h,v 1.2 2003/10/20 07:18:11 stewart Exp $
8    | 
9    |    (C)2003 Stewart Smith
10   |    Distributed under the GNU GPL
11   | */
12   | 
13   | #ifndef __ONODE_VERSIONED_H__
14   | #define __ONODE_VERSIONED_H__
15   | 
16   | #include "testkit/types.h"
17   | 
18   | enum fcfs_onode_fork_rev_op {
19   |   FCFS_ONODE_FORK_REV_REPLACE,
20   |   FCFS_ONODE_FORK_REV_INSERT,
21   |   FCFS_ONODE_FORE_REV_APPEND,
22   |   FCFS_ONODE_FORK_REV_TRUNCATE,
23   |   FCFS_ONODE_FORK_REV_GROW,
24   | };
25   | 
26   | #define FCFS_ONODE_FORK_REV_MAGIC1 0xF0526B76	/* 0xF0 'R' 'k' 'v' */
27   | 
28   | struct fcfs_onode_fork_rev {
29   |   u64 revision;			/* Increment for each revision */
30   |   u64 consistent_revision;	/* Used to note last consistent revision */
31   |   u64 time;			/* Time revision was done (not committed) */
32   |   u32 operation;		/* enum fcfs_onode_fork_rev_op */
33   |   u32 magic1;			/* FCFS_ONODE_FORK_REV_MAGIC1 */
34   |   u64 rev_offset;		/* Offset in revision fork */
35   |   u64 rev_length;		/* Length of revision fork data */
36   |   u64 offset;			/* Offset in real fork to apply to*/
37   |   char space[16];		/* Space for future revisions */
38   | };
39   | 
40   | #endif