Changes for kernel and Busybox
[tomato.git] / release / src / router / busybox / e2fsprogs / ext2fs / jfs_dat.h
blob17c586a29b234669b26e01d8d8507c4b698da3a8
1 /* vi: set sw=4 ts=4: */
2 /*
3 * jfs_dat.h --- stripped down header file which only contains the JFS
4 * on-disk data structures
5 */
7 #define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
9 /*
10 * On-disk structures
14 * Descriptor block types:
17 #define JFS_DESCRIPTOR_BLOCK 1
18 #define JFS_COMMIT_BLOCK 2
19 #define JFS_SUPERBLOCK 3
22 * Standard header for all descriptor blocks:
24 typedef struct journal_header_s
26 __u32 h_magic;
27 __u32 h_blocktype;
28 __u32 h_sequence;
29 } journal_header_t;
33 * The block tag: used to describe a single buffer in the journal
35 typedef struct journal_block_tag_s
37 __u32 t_blocknr; /* The on-disk block number */
38 __u32 t_flags; /* See below */
39 } journal_block_tag_t;
41 /* Definitions for the journal tag flags word: */
42 #define JFS_FLAG_ESCAPE 1 /* on-disk block is escaped */
43 #define JFS_FLAG_SAME_UUID 2 /* block has same uuid as previous */
44 #define JFS_FLAG_DELETED 4 /* block deleted by this transaction */
45 #define JFS_FLAG_LAST_TAG 8 /* last tag in this descriptor block */
49 * The journal superblock
51 typedef struct journal_superblock_s
53 journal_header_t s_header;
55 /* Static information describing the journal */
56 __u32 s_blocksize; /* journal device blocksize */
57 __u32 s_maxlen; /* total blocks in journal file */
58 __u32 s_first; /* first block of log information */
60 /* Dynamic information describing the current state of the log */
61 __u32 s_sequence; /* first commit ID expected in log */
62 __u32 s_start; /* blocknr of start of log */
63 } journal_superblock_t;