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 ****************************************************************************/
15 #include "jfs_compat.h"
17 #define jfs_debug jbd_debug
19 #define journal_oom_retry 1
21 #undef JBD_PARANOID_IOFAIL
23 #define JBD_DEFAULT_MAX_COMMIT_AGE 5
25 #define jbd_debug(f, a...)
27 #define jbd_kmalloc(size, flags) __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
28 #define jbd_rep_kmalloc(size, flags) __jbd_kmalloc(__FUNCTION__, (size), (flags), 1)
30 #define JFS_MIN_JOURNAL_BLOCKS 1024
32 #define JFS_MAGIC_NUMBER 0xc03b3998U
34 #define JFS_DESCRIPTOR_BLOCK 1
35 #define JFS_COMMIT_BLOCK 2
36 #define JFS_SUPERBLOCK_V1 3
37 #define JFS_SUPERBLOCK_V2 4
38 #define JFS_REVOKE_BLOCK 5
40 typedef struct journal_header_s
47 typedef struct journal_block_tag_s
51 } journal_block_tag_t;
53 typedef struct journal_revoke_header_s
55 journal_header_t r_header;
57 } journal_revoke_header_t;
59 #define JFS_FLAG_ESCAPE 1
60 #define JFS_FLAG_SAME_UUID 2
61 #define JFS_FLAG_DELETED 4
62 #define JFS_FLAG_LAST_TAG 8
64 typedef struct journal_superblock_s
67 journal_header_t s_header;
78 __be32 s_feature_compat;
79 __be32 s_feature_incompat;
80 __be32 s_feature_ro_compat;
88 __be32 s_max_transaction;
89 __be32 s_max_trans_data;
95 } journal_superblock_t;
97 #define JFS_HAS_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
98 #define JFS_HAS_RO_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
99 #define JFS_HAS_INCOMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
101 #define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001
103 #define JFS_KNOWN_COMPAT_FEATURES 0
104 #define JFS_KNOWN_ROCOMPAT_FEATURES 0
105 #define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE
108 #define BJ_SyncData 1
109 #define BJ_Metadata 2
114 #define BJ_Reserved 7