Android-cuttlefish cvd tool
jbd2.h
Go to the documentation of this file.
1/****************************************************************************
2 ****************************************************************************
3 ***
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.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _LINUX_JBD2_H
13#define _LINUX_JBD2_H
14
15#define JBD2_DEBUG
16#define jfs_debug jbd_debug
17
18#define journal_oom_retry 1
19
20#undef JBD2_PARANOID_IOFAIL
21
22#define JBD2_DEFAULT_MAX_COMMIT_AGE 5
23
24#define jbd_debug(f, a...)
25
26#define JBD2_MIN_JOURNAL_BLOCKS 1024
27
28#define JBD2_MAGIC_NUMBER 0xc03b3998U
29
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
35
36typedef struct journal_header_s {
41
42#define JBD2_CRC32_CHKSUM 1
43#define JBD2_MD5_CHKSUM 2
44#define JBD2_SHA1_CHKSUM 3
45
46#define JBD2_CRC32_CHKSUM_SIZE 4
47
48#define JBD2_CHECKSUM_BYTES (32 / sizeof(__u32))
49
54 unsigned char h_chksum_type;
55 unsigned char h_chksum_size;
56 unsigned char h_padding[2];
60};
61
62typedef struct journal_block_tag_s {
67
68#define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
69#define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t))
70
75
76#define JBD2_FLAG_ESCAPE 1
77#define JBD2_FLAG_SAME_UUID 2
78#define JBD2_FLAG_DELETED 4
79#define JBD2_FLAG_LAST_TAG 8
80
81typedef struct journal_superblock_s {
83
87
90
92
96
98
100
102
105
107
108 __u8 s_users[16 * 48];
109
111
112#define JBD2_HAS_COMPAT_FEATURE(j, mask) \
113 ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
114#define JBD2_HAS_RO_COMPAT_FEATURE(j, mask) \
115 ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
116#define JBD2_HAS_INCOMPAT_FEATURE(j, mask) \
117 ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
118
119#define JBD2_FEATURE_COMPAT_CHECKSUM 0x00000001
120
121#define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001
122#define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002
123#define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004
124
125#define JBD2_KNOWN_COMPAT_FEATURES JBD2_FEATURE_COMPAT_CHECKSUM
126#define JBD2_KNOWN_ROCOMPAT_FEATURES 0
127#define JBD2_KNOWN_INCOMPAT_FEATURES \
128 (JBD2_FEATURE_INCOMPAT_REVOKE | JBD2_FEATURE_INCOMPAT_64BIT | \
129 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)
130
131#define BJ_None 0
132#define BJ_Metadata 1
133#define BJ_Forget 2
134#define BJ_IO 3
135#define BJ_Shadow 4
136#define BJ_LogCtl 5
137#define BJ_Reserved 6
138#define BJ_Types 7
139
140#endif
__u64 __bitwise __be64
Definition: blkid_types.h:43
__u32 __bitwise __be32
Definition: blkid_types.h:42
unsigned int __u32
Definition: blkid_types.h:14
unsigned char __u8
Definition: blkid_types.h:10
#define JBD2_CHECKSUM_BYTES
Definition: jbd2.h:48
struct journal_block_tag_s journal_block_tag_t
struct journal_superblock_s journal_superblock_t
struct jbd2_journal_revoke_header_s jbd2_journal_revoke_header_t
struct journal_header_s journal_header_t
Definition: jbd2.h:50
unsigned char h_padding[2]
Definition: jbd2.h:56
unsigned char h_chksum_size
Definition: jbd2.h:55
__be32 h_commit_nsec
Definition: jbd2.h:59
__be32 h_blocktype
Definition: jbd2.h:52
__be32 h_chksum[JBD2_CHECKSUM_BYTES]
Definition: jbd2.h:57
__be32 h_sequence
Definition: jbd2.h:53
__be32 h_magic
Definition: jbd2.h:51
__be64 h_commit_sec
Definition: jbd2.h:58
unsigned char h_chksum_type
Definition: jbd2.h:54
Definition: jbd2.h:71
__be32 r_count
Definition: jbd2.h:73
journal_header_t r_header
Definition: jbd2.h:72
Definition: jbd2.h:62
__be32 t_blocknr_high
Definition: jbd2.h:65
__be32 t_blocknr
Definition: jbd2.h:63
__be32 t_flags
Definition: jbd2.h:64
Definition: jbd2.h:36
__be32 h_blocktype
Definition: jbd2.h:38
__be32 h_magic
Definition: jbd2.h:37
__be32 h_sequence
Definition: jbd2.h:39
Definition: jbd2.h:81
__be32 s_nr_users
Definition: jbd2.h:99
__be32 s_errno
Definition: jbd2.h:91
__be32 s_sequence
Definition: jbd2.h:88
__be32 s_max_transaction
Definition: jbd2.h:103
__u8 s_uuid[16]
Definition: jbd2.h:97
__be32 s_feature_incompat
Definition: jbd2.h:94
__be32 s_first
Definition: jbd2.h:86
__be32 s_dynsuper
Definition: jbd2.h:101
__be32 s_max_trans_data
Definition: jbd2.h:104
__be32 s_feature_compat
Definition: jbd2.h:93
__be32 s_maxlen
Definition: jbd2.h:85
__u32 s_padding[44]
Definition: jbd2.h:106
__be32 s_start
Definition: jbd2.h:89
__be32 s_blocksize
Definition: jbd2.h:84
__be32 s_feature_ro_compat
Definition: jbd2.h:95
__u8 s_users[16 *48]
Definition: jbd2.h:108
journal_header_t s_header
Definition: jbd2.h:82