1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
16 #define jfs_debug jbd_debug
18 #define journal_oom_retry 1
20 #undef JBD2_PARANOID_IOFAIL
22 #define JBD2_DEFAULT_MAX_COMMIT_AGE 5
24 #define jbd_debug(f, a...)
26 #define JBD2_MIN_JOURNAL_BLOCKS 1024
28 #define JBD2_MAGIC_NUMBER 0xc03b3998U
30 #define JBD2_DESCRIPTOR_BLOCK 1
31 #define JBD2_COMMIT_BLOCK 2
32 #define JBD2_SUPERBLOCK_V1 3
33 #define JBD2_SUPERBLOCK_V2 4
34 #define JBD2_REVOKE_BLOCK 5
36 typedef struct journal_header_s
43 #define JBD2_CRC32_CHKSUM 1
44 #define JBD2_MD5_CHKSUM 2
45 #define JBD2_SHA1_CHKSUM 3
47 #define JBD2_CRC32_CHKSUM_SIZE 4
49 #define JBD2_CHECKSUM_BYTES (32 / sizeof(__u32))
51 struct commit_header {
55 unsigned char h_chksum_type;
56 unsigned char h_chksum_size;
57 unsigned char h_padding[2];
58 __be32 h_chksum[JBD2_CHECKSUM_BYTES];
63 typedef struct journal_block_tag_s
67 __be32 t_blocknr_high;
68 } journal_block_tag_t;
70 #define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
71 #define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t))
73 typedef struct jbd2_journal_revoke_header_s
75 journal_header_t r_header;
77 } jbd2_journal_revoke_header_t;
79 #define JBD2_FLAG_ESCAPE 1
80 #define JBD2_FLAG_SAME_UUID 2
81 #define JBD2_FLAG_DELETED 4
82 #define JBD2_FLAG_LAST_TAG 8
84 typedef struct journal_superblock_s
87 journal_header_t s_header;
98 __be32 s_feature_compat;
99 __be32 s_feature_incompat;
100 __be32 s_feature_ro_compat;
108 __be32 s_max_transaction;
109 __be32 s_max_trans_data;
115 } journal_superblock_t;
117 #define JBD2_HAS_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
118 #define JBD2_HAS_RO_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
119 #define JBD2_HAS_INCOMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
121 #define JBD2_FEATURE_COMPAT_CHECKSUM 0x00000001
123 #define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001
124 #define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002
125 #define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004
127 #define JBD2_KNOWN_COMPAT_FEATURES JBD2_FEATURE_COMPAT_CHECKSUM
128 #define JBD2_KNOWN_ROCOMPAT_FEATURES 0
129 #define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | JBD2_FEATURE_INCOMPAT_64BIT | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)
132 #define BJ_Metadata 1
137 #define BJ_Reserved 6