lwext4_rs/
lwext4.rs

1/* automatically generated by rust-bindgen 0.72.0 */
2
3#[repr(C)]
4#[derive(Default)]
5pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
6impl<T> __IncompleteArrayField<T> {
7    #[inline]
8    pub const fn new() -> Self {
9        __IncompleteArrayField(::std::marker::PhantomData, [])
10    }
11    #[inline]
12    pub fn as_ptr(&self) -> *const T {
13        self as *const _ as *const T
14    }
15    #[inline]
16    pub fn as_mut_ptr(&mut self) -> *mut T {
17        self as *mut _ as *mut T
18    }
19    #[inline]
20    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
21        ::std::slice::from_raw_parts(self.as_ptr(), len)
22    }
23    #[inline]
24    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
25        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
26    }
27}
28impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
29    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30        fmt.write_str("__IncompleteArrayField")
31    }
32}
33pub const F_SET_EXT2: u32 = 2;
34pub const F_SET_EXT3: u32 = 3;
35pub const F_SET_EXT4: u32 = 4;
36pub const CONFIG_EXT_FEATURE_SET_LVL: u32 = 4;
37pub const CONFIG_JOURNALING_ENABLE: u32 = 1;
38pub const CONFIG_XATTR_ENABLE: u32 = 1;
39pub const CONFIG_EXTENTS_ENABLE: u32 = 1;
40pub const CONFIG_HAVE_OWN_ERRNO: u32 = 0;
41pub const CONFIG_DEBUG_PRINTF: u32 = 1;
42pub const CONFIG_DEBUG_ASSERT: u32 = 1;
43pub const CONFIG_HAVE_OWN_ASSERT: u32 = 1;
44pub const CONFIG_BLOCK_DEV_ENABLE_STATS: u32 = 1;
45pub const CONFIG_BLOCK_DEV_CACHE_SIZE: u32 = 32;
46pub const CONFIG_EXT4_MAX_BLOCKDEV_NAME: u32 = 32;
47pub const CONFIG_EXT4_BLOCKDEVS_COUNT: u32 = 2;
48pub const CONFIG_EXT4_MAX_MP_NAME: u32 = 32;
49pub const CONFIG_EXT4_MOUNTPOINTS_COUNT: u32 = 2;
50pub const CONFIG_HAVE_OWN_OFLAGS: u32 = 1;
51pub const CONFIG_MAX_TRUNCATE_SIZE: u32 = 16777216;
52pub const CONFIG_UNALIGNED_ACCESS: u32 = 0;
53pub const CONFIG_USE_USER_MALLOC: u32 = 0;
54pub const __bool_true_false_are_defined: u32 = 1;
55pub const true_: u32 = 1;
56pub const false_: u32 = 0;
57pub const SPLAY_NEGINF: i32 = -1;
58pub const SPLAY_INF: u32 = 1;
59pub const RB_BLACK: u32 = 0;
60pub const RB_RED: u32 = 1;
61pub const RB_NEGINF: i32 = -1;
62pub const RB_INF: u32 = 1;
63pub const EXT4_CHECKSUM_CRC32C: u32 = 1;
64pub const UUID_SIZE: u32 = 16;
65pub const EXT4_SUPERBLOCK_MAGIC: u32 = 61267;
66pub const EXT4_SUPERBLOCK_SIZE: u32 = 1024;
67pub const EXT4_SUPERBLOCK_OFFSET: u32 = 1024;
68pub const EXT4_SUPERBLOCK_OS_LINUX: u32 = 0;
69pub const EXT4_SUPERBLOCK_OS_HURD: u32 = 1;
70pub const EXT4_SUPERBLOCK_FLAGS_SIGNED_HASH: u32 = 1;
71pub const EXT4_SUPERBLOCK_FLAGS_UNSIGNED_HASH: u32 = 2;
72pub const EXT4_SUPERBLOCK_FLAGS_TEST_FILESYS: u32 = 4;
73pub const EXT4_SUPERBLOCK_STATE_VALID_FS: u32 = 1;
74pub const EXT4_SUPERBLOCK_STATE_ERROR_FS: u32 = 2;
75pub const EXT4_SUPERBLOCK_STATE_ORPHAN_FS: u32 = 4;
76pub const EXT4_SUPERBLOCK_ERRORS_CONTINUE: u32 = 1;
77pub const EXT4_SUPERBLOCK_ERRORS_RO: u32 = 2;
78pub const EXT4_SUPERBLOCK_ERRORS_PANIC: u32 = 3;
79pub const EXT4_FCOM_DIR_PREALLOC: u32 = 1;
80pub const EXT4_FCOM_IMAGIC_INODES: u32 = 2;
81pub const EXT4_FCOM_HAS_JOURNAL: u32 = 4;
82pub const EXT4_FCOM_EXT_ATTR: u32 = 8;
83pub const EXT4_FCOM_RESIZE_INODE: u32 = 16;
84pub const EXT4_FCOM_DIR_INDEX: u32 = 32;
85pub const EXT4_FRO_COM_SPARSE_SUPER: u32 = 1;
86pub const EXT4_FRO_COM_LARGE_FILE: u32 = 2;
87pub const EXT4_FRO_COM_BTREE_DIR: u32 = 4;
88pub const EXT4_FRO_COM_HUGE_FILE: u32 = 8;
89pub const EXT4_FRO_COM_GDT_CSUM: u32 = 16;
90pub const EXT4_FRO_COM_DIR_NLINK: u32 = 32;
91pub const EXT4_FRO_COM_EXTRA_ISIZE: u32 = 64;
92pub const EXT4_FRO_COM_QUOTA: u32 = 256;
93pub const EXT4_FRO_COM_BIGALLOC: u32 = 512;
94pub const EXT4_FRO_COM_METADATA_CSUM: u32 = 1024;
95pub const EXT4_FINCOM_COMPRESSION: u32 = 1;
96pub const EXT4_FINCOM_FILETYPE: u32 = 2;
97pub const EXT4_FINCOM_RECOVER: u32 = 4;
98pub const EXT4_FINCOM_JOURNAL_DEV: u32 = 8;
99pub const EXT4_FINCOM_META_BG: u32 = 16;
100pub const EXT4_FINCOM_EXTENTS: u32 = 64;
101pub const EXT4_FINCOM_64BIT: u32 = 128;
102pub const EXT4_FINCOM_MMP: u32 = 256;
103pub const EXT4_FINCOM_FLEX_BG: u32 = 512;
104pub const EXT4_FINCOM_EA_INODE: u32 = 1024;
105pub const EXT4_FINCOM_DIRDATA: u32 = 4096;
106pub const EXT4_FINCOM_BG_USE_META_CSUM: u32 = 8192;
107pub const EXT4_FINCOM_LARGEDIR: u32 = 16384;
108pub const EXT4_FINCOM_INLINE_DATA: u32 = 32768;
109pub const EXT2_SUPPORTED_FCOM: u32 = 0;
110pub const EXT2_SUPPORTED_FINCOM: u32 = 18;
111pub const EXT2_SUPPORTED_FRO_COM: u32 = 3;
112pub const EXT3_SUPPORTED_FCOM: u32 = 32;
113pub const EXT3_SUPPORTED_FINCOM: u32 = 18;
114pub const EXT3_SUPPORTED_FRO_COM: u32 = 3;
115pub const EXT4_SUPPORTED_FCOM: u32 = 32;
116pub const EXT4_SUPPORTED_FINCOM: u32 = 722;
117pub const EXT4_SUPPORTED_FRO_COM: u32 = 1147;
118pub const EXT_FINCOM_IGNORED: u32 = 260;
119pub const EXT4_BLOCK_GROUP_INODE_UNINIT: u32 = 1;
120pub const EXT4_BLOCK_GROUP_BLOCK_UNINIT: u32 = 2;
121pub const EXT4_BLOCK_GROUP_ITABLE_ZEROED: u32 = 4;
122pub const EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE: u32 = 32;
123pub const EXT4_MAX_BLOCK_GROUP_DESCRIPTOR_SIZE: u32 = 64;
124pub const EXT4_MIN_BLOCK_SIZE: u32 = 1024;
125pub const EXT4_MAX_BLOCK_SIZE: u32 = 65536;
126pub const EXT4_REV0_INODE_SIZE: u32 = 128;
127pub const EXT4_INODE_BLOCK_SIZE: u32 = 512;
128pub const EXT4_INODE_DIRECT_BLOCK_COUNT: u32 = 12;
129pub const EXT4_INODE_INDIRECT_BLOCK: u32 = 12;
130pub const EXT4_INODE_DOUBLE_INDIRECT_BLOCK: u32 = 13;
131pub const EXT4_INODE_TRIPPLE_INDIRECT_BLOCK: u32 = 14;
132pub const EXT4_INODE_BLOCKS: u32 = 15;
133pub const EXT4_INODE_INDIRECT_BLOCK_COUNT: u32 = 3;
134pub const EXT4_INODE_MODE_FIFO: u32 = 4096;
135pub const EXT4_INODE_MODE_CHARDEV: u32 = 8192;
136pub const EXT4_INODE_MODE_DIRECTORY: u32 = 16384;
137pub const EXT4_INODE_MODE_BLOCKDEV: u32 = 24576;
138pub const EXT4_INODE_MODE_FILE: u32 = 32768;
139pub const EXT4_INODE_MODE_SOFTLINK: u32 = 40960;
140pub const EXT4_INODE_MODE_SOCKET: u32 = 49152;
141pub const EXT4_INODE_MODE_TYPE_MASK: u32 = 61440;
142pub const EXT4_INODE_FLAG_SECRM: u32 = 1;
143pub const EXT4_INODE_FLAG_UNRM: u32 = 2;
144pub const EXT4_INODE_FLAG_COMPR: u32 = 4;
145pub const EXT4_INODE_FLAG_SYNC: u32 = 8;
146pub const EXT4_INODE_FLAG_IMMUTABLE: u32 = 16;
147pub const EXT4_INODE_FLAG_APPEND: u32 = 32;
148pub const EXT4_INODE_FLAG_NODUMP: u32 = 64;
149pub const EXT4_INODE_FLAG_NOATIME: u32 = 128;
150pub const EXT4_INODE_FLAG_DIRTY: u32 = 256;
151pub const EXT4_INODE_FLAG_COMPRBLK: u32 = 512;
152pub const EXT4_INODE_FLAG_NOCOMPR: u32 = 1024;
153pub const EXT4_INODE_FLAG_ECOMPR: u32 = 2048;
154pub const EXT4_INODE_FLAG_INDEX: u32 = 4096;
155pub const EXT4_INODE_FLAG_IMAGIC: u32 = 8192;
156pub const EXT4_INODE_FLAG_JOURNAL_DATA: u32 = 16384;
157pub const EXT4_INODE_FLAG_NOTAIL: u32 = 32768;
158pub const EXT4_INODE_FLAG_DIRSYNC: u32 = 65536;
159pub const EXT4_INODE_FLAG_TOPDIR: u32 = 131072;
160pub const EXT4_INODE_FLAG_HUGE_FILE: u32 = 262144;
161pub const EXT4_INODE_FLAG_EXTENTS: u32 = 524288;
162pub const EXT4_INODE_FLAG_EA_INODE: u32 = 2097152;
163pub const EXT4_INODE_FLAG_EOFBLOCKS: u32 = 4194304;
164pub const EXT4_INODE_FLAG_RESERVED: u32 = 2147483648;
165pub const EXT4_INODE_ROOT_INDEX: u32 = 2;
166pub const EXT4_DIRECTORY_FILENAME_LEN: u32 = 255;
167pub const EXT4_DIRENTRY_DIR_CSUM: u32 = 222;
168pub const EXT4_ERR_BAD_DX_DIR: i32 = -25000;
169pub const EXT4_LINK_MAX: u32 = 65000;
170pub const EXT4_BAD_INO: u32 = 1;
171pub const EXT4_ROOT_INO: u32 = 2;
172pub const EXT4_BOOT_LOADER_INO: u32 = 5;
173pub const EXT4_UNDEL_DIR_INO: u32 = 6;
174pub const EXT4_RESIZE_INO: u32 = 7;
175pub const EXT4_JOURNAL_INO: u32 = 8;
176pub const EXT4_GOOD_OLD_FIRST_INO: u32 = 11;
177pub const EXT2_HTREE_LEGACY: u32 = 0;
178pub const EXT2_HTREE_HALF_MD4: u32 = 1;
179pub const EXT2_HTREE_TEA: u32 = 2;
180pub const EXT2_HTREE_LEGACY_UNSIGNED: u32 = 3;
181pub const EXT2_HTREE_HALF_MD4_UNSIGNED: u32 = 4;
182pub const EXT2_HTREE_TEA_UNSIGNED: u32 = 5;
183pub const EXT2_HTREE_EOF: u32 = 2147483647;
184pub const EXT4_GOOD_OLD_INODE_SIZE: u32 = 128;
185pub const JBD_MAGIC_NUMBER: u32 = 3225106840;
186pub const JBD_DESCRIPTOR_BLOCK: u32 = 1;
187pub const JBD_COMMIT_BLOCK: u32 = 2;
188pub const JBD_SUPERBLOCK: u32 = 3;
189pub const JBD_SUPERBLOCK_V2: u32 = 4;
190pub const JBD_REVOKE_BLOCK: u32 = 5;
191pub const JBD_CRC32_CHKSUM: u32 = 1;
192pub const JBD_MD5_CHKSUM: u32 = 2;
193pub const JBD_SHA1_CHKSUM: u32 = 3;
194pub const JBD_CRC32C_CHKSUM: u32 = 4;
195pub const JBD_CRC32_CHKSUM_SIZE: u32 = 4;
196pub const JBD_FLAG_ESCAPE: u32 = 1;
197pub const JBD_FLAG_SAME_UUID: u32 = 2;
198pub const JBD_FLAG_DELETED: u32 = 4;
199pub const JBD_FLAG_LAST_TAG: u32 = 8;
200pub const JBD_USERS_MAX: u32 = 48;
201pub const JBD_USERS_SIZE: u32 = 768;
202pub const JBD_FEATURE_COMPAT_CHECKSUM: u32 = 1;
203pub const JBD_FEATURE_INCOMPAT_REVOKE: u32 = 1;
204pub const JBD_FEATURE_INCOMPAT_64BIT: u32 = 2;
205pub const JBD_FEATURE_INCOMPAT_ASYNC_COMMIT: u32 = 4;
206pub const JBD_FEATURE_INCOMPAT_CSUM_V2: u32 = 8;
207pub const JBD_FEATURE_INCOMPAT_CSUM_V3: u32 = 16;
208pub const JBD_KNOWN_COMPAT_FEATURES: u32 = 0;
209pub const JBD_KNOWN_ROCOMPAT_FEATURES: u32 = 0;
210pub const JBD_KNOWN_INCOMPAT_FEATURES: u32 = 31;
211pub const EXT4_CRC32_INIT: u32 = 4294967295;
212pub const EPERM: u32 = 1;
213pub const ENOENT: u32 = 2;
214pub const ESRCH: u32 = 3;
215pub const EINTR: u32 = 4;
216pub const EIO: u32 = 5;
217pub const ENXIO: u32 = 6;
218pub const E2BIG: u32 = 7;
219pub const ENOEXEC: u32 = 8;
220pub const EBADF: u32 = 9;
221pub const ECHILD: u32 = 10;
222pub const EAGAIN: u32 = 11;
223pub const ENOMEM: u32 = 12;
224pub const EACCES: u32 = 13;
225pub const EFAULT: u32 = 14;
226pub const ENOTBLK: u32 = 15;
227pub const EBUSY: u32 = 16;
228pub const EEXIST: u32 = 17;
229pub const EXDEV: u32 = 18;
230pub const ENODEV: u32 = 19;
231pub const ENOTDIR: u32 = 20;
232pub const EISDIR: u32 = 21;
233pub const EINVAL: u32 = 22;
234pub const ENFILE: u32 = 23;
235pub const EMFILE: u32 = 24;
236pub const ENOTTY: u32 = 25;
237pub const ETXTBSY: u32 = 26;
238pub const EFBIG: u32 = 27;
239pub const ENOSPC: u32 = 28;
240pub const ESPIPE: u32 = 29;
241pub const EROFS: u32 = 30;
242pub const EMLINK: u32 = 31;
243pub const EPIPE: u32 = 32;
244pub const EDOM: u32 = 33;
245pub const ERANGE: u32 = 34;
246pub const EDEADLK: u32 = 35;
247pub const ENAMETOOLONG: u32 = 36;
248pub const ENOLCK: u32 = 37;
249pub const ENOSYS: u32 = 38;
250pub const ENOTEMPTY: u32 = 39;
251pub const ELOOP: u32 = 40;
252pub const EWOULDBLOCK: u32 = 11;
253pub const ENOMSG: u32 = 42;
254pub const EIDRM: u32 = 43;
255pub const ECHRNG: u32 = 44;
256pub const EL2NSYNC: u32 = 45;
257pub const EL3HLT: u32 = 46;
258pub const EL3RST: u32 = 47;
259pub const ELNRNG: u32 = 48;
260pub const EUNATCH: u32 = 49;
261pub const ENOCSI: u32 = 50;
262pub const EL2HLT: u32 = 51;
263pub const EBADE: u32 = 52;
264pub const EBADR: u32 = 53;
265pub const EXFULL: u32 = 54;
266pub const ENOANO: u32 = 55;
267pub const EBADRQC: u32 = 56;
268pub const EBADSLT: u32 = 57;
269pub const EDEADLOCK: u32 = 35;
270pub const EBFONT: u32 = 59;
271pub const ENOSTR: u32 = 60;
272pub const ENODATA: u32 = 61;
273pub const ETIME: u32 = 62;
274pub const ENOSR: u32 = 63;
275pub const ENONET: u32 = 64;
276pub const ENOPKG: u32 = 65;
277pub const EREMOTE: u32 = 66;
278pub const ENOLINK: u32 = 67;
279pub const EADV: u32 = 68;
280pub const ESRMNT: u32 = 69;
281pub const ECOMM: u32 = 70;
282pub const EPROTO: u32 = 71;
283pub const EMULTIHOP: u32 = 72;
284pub const EDOTDOT: u32 = 73;
285pub const EBADMSG: u32 = 74;
286pub const EOVERFLOW: u32 = 75;
287pub const ENOTUNIQ: u32 = 76;
288pub const EBADFD: u32 = 77;
289pub const EREMCHG: u32 = 78;
290pub const ELIBACC: u32 = 79;
291pub const ELIBBAD: u32 = 80;
292pub const ELIBSCN: u32 = 81;
293pub const ELIBMAX: u32 = 82;
294pub const ELIBEXEC: u32 = 83;
295pub const EILSEQ: u32 = 84;
296pub const ERESTART: u32 = 85;
297pub const ESTRPIPE: u32 = 86;
298pub const EUSERS: u32 = 87;
299pub const ENOTSOCK: u32 = 88;
300pub const EDESTADDRREQ: u32 = 89;
301pub const EMSGSIZE: u32 = 90;
302pub const EPROTOTYPE: u32 = 91;
303pub const ENOPROTOOPT: u32 = 92;
304pub const EPROTONOSUPPORT: u32 = 93;
305pub const ESOCKTNOSUPPORT: u32 = 94;
306pub const EOPNOTSUPP: u32 = 95;
307pub const ENOTSUP: u32 = 95;
308pub const EPFNOSUPPORT: u32 = 96;
309pub const EAFNOSUPPORT: u32 = 97;
310pub const EADDRINUSE: u32 = 98;
311pub const EADDRNOTAVAIL: u32 = 99;
312pub const ENETDOWN: u32 = 100;
313pub const ENETUNREACH: u32 = 101;
314pub const ENETRESET: u32 = 102;
315pub const ECONNABORTED: u32 = 103;
316pub const ECONNRESET: u32 = 104;
317pub const ENOBUFS: u32 = 105;
318pub const EISCONN: u32 = 106;
319pub const ENOTCONN: u32 = 107;
320pub const ESHUTDOWN: u32 = 108;
321pub const ETOOMANYREFS: u32 = 109;
322pub const ETIMEDOUT: u32 = 110;
323pub const ECONNREFUSED: u32 = 111;
324pub const EHOSTDOWN: u32 = 112;
325pub const EHOSTUNREACH: u32 = 113;
326pub const EALREADY: u32 = 114;
327pub const EINPROGRESS: u32 = 115;
328pub const ESTALE: u32 = 116;
329pub const EUCLEAN: u32 = 117;
330pub const ENOTNAM: u32 = 118;
331pub const ENAVAIL: u32 = 119;
332pub const EISNAM: u32 = 120;
333pub const EREMOTEIO: u32 = 121;
334pub const EDQUOT: u32 = 122;
335pub const ENOMEDIUM: u32 = 123;
336pub const EMEDIUMTYPE: u32 = 124;
337pub const ECANCELED: u32 = 125;
338pub const ENOKEY: u32 = 126;
339pub const EKEYEXPIRED: u32 = 127;
340pub const EKEYREVOKED: u32 = 128;
341pub const EKEYREJECTED: u32 = 129;
342pub const EOWNERDEAD: u32 = 130;
343pub const ENOTRECOVERABLE: u32 = 131;
344pub const ERFKILL: u32 = 132;
345pub const EHWPOISON: u32 = 133;
346pub const EIEIO: u32 = 4095;
347pub const EOK: u32 = 0;
348pub const O_RDONLY: u32 = 0;
349pub const O_WRONLY: u32 = 1;
350pub const O_RDWR: u32 = 2;
351pub const O_CREAT: u32 = 64;
352pub const O_EXCL: u32 = 128;
353pub const O_TRUNC: u32 = 512;
354pub const O_APPEND: u32 = 1024;
355pub const SEEK_SET: u32 = 0;
356pub const SEEK_CUR: u32 = 1;
357pub const SEEK_END: u32 = 2;
358pub const __PRI64: &[u8; 2] = b"l\0";
359pub const __PRIPTR: &[u8; 2] = b"l\0";
360pub const PRId8: &[u8; 2] = b"d\0";
361pub const PRIi8: &[u8; 2] = b"i\0";
362pub const PRIdLEAST8: &[u8; 2] = b"d\0";
363pub const PRIiLEAST8: &[u8; 2] = b"i\0";
364pub const PRIdFAST8: &[u8; 2] = b"d\0";
365pub const PRIiFAST8: &[u8; 2] = b"i\0";
366pub const PRId16: &[u8; 2] = b"d\0";
367pub const PRIi16: &[u8; 2] = b"i\0";
368pub const PRIdLEAST16: &[u8; 2] = b"d\0";
369pub const PRIiLEAST16: &[u8; 2] = b"i\0";
370pub const PRIdFAST16: &[u8; 3] = b"ld\0";
371pub const PRIiFAST16: &[u8; 3] = b"li\0";
372pub const PRId32: &[u8; 2] = b"d\0";
373pub const PRIi32: &[u8; 2] = b"i\0";
374pub const PRIdLEAST32: &[u8; 2] = b"d\0";
375pub const PRIiLEAST32: &[u8; 2] = b"i\0";
376pub const PRIdFAST32: &[u8; 3] = b"ld\0";
377pub const PRIiFAST32: &[u8; 3] = b"li\0";
378pub const PRId64: &[u8; 3] = b"ld\0";
379pub const PRIi64: &[u8; 3] = b"li\0";
380pub const PRIdLEAST64: &[u8; 3] = b"ld\0";
381pub const PRIiLEAST64: &[u8; 3] = b"li\0";
382pub const PRIdFAST64: &[u8; 3] = b"ld\0";
383pub const PRIiFAST64: &[u8; 3] = b"li\0";
384pub const PRIdMAX: &[u8; 3] = b"ld\0";
385pub const PRIiMAX: &[u8; 3] = b"li\0";
386pub const PRIdPTR: &[u8; 3] = b"ld\0";
387pub const PRIiPTR: &[u8; 3] = b"li\0";
388pub const PRIo8: &[u8; 2] = b"o\0";
389pub const PRIu8: &[u8; 2] = b"u\0";
390pub const PRIx8: &[u8; 2] = b"x\0";
391pub const PRIX8: &[u8; 2] = b"X\0";
392pub const PRIoLEAST8: &[u8; 2] = b"o\0";
393pub const PRIuLEAST8: &[u8; 2] = b"u\0";
394pub const PRIxLEAST8: &[u8; 2] = b"x\0";
395pub const PRIXLEAST8: &[u8; 2] = b"X\0";
396pub const PRIoFAST8: &[u8; 2] = b"o\0";
397pub const PRIuFAST8: &[u8; 2] = b"u\0";
398pub const PRIxFAST8: &[u8; 2] = b"x\0";
399pub const PRIXFAST8: &[u8; 2] = b"X\0";
400pub const PRIo16: &[u8; 2] = b"o\0";
401pub const PRIu16: &[u8; 2] = b"u\0";
402pub const PRIx16: &[u8; 2] = b"x\0";
403pub const PRIX16: &[u8; 2] = b"X\0";
404pub const PRIoLEAST16: &[u8; 2] = b"o\0";
405pub const PRIuLEAST16: &[u8; 2] = b"u\0";
406pub const PRIxLEAST16: &[u8; 2] = b"x\0";
407pub const PRIXLEAST16: &[u8; 2] = b"X\0";
408pub const PRIoFAST16: &[u8; 3] = b"lo\0";
409pub const PRIuFAST16: &[u8; 3] = b"lu\0";
410pub const PRIxFAST16: &[u8; 3] = b"lx\0";
411pub const PRIXFAST16: &[u8; 3] = b"lX\0";
412pub const PRIo32: &[u8; 2] = b"o\0";
413pub const PRIu32: &[u8; 2] = b"u\0";
414pub const PRIx32: &[u8; 2] = b"x\0";
415pub const PRIX32: &[u8; 2] = b"X\0";
416pub const PRIoLEAST32: &[u8; 2] = b"o\0";
417pub const PRIuLEAST32: &[u8; 2] = b"u\0";
418pub const PRIxLEAST32: &[u8; 2] = b"x\0";
419pub const PRIXLEAST32: &[u8; 2] = b"X\0";
420pub const PRIoFAST32: &[u8; 3] = b"lo\0";
421pub const PRIuFAST32: &[u8; 3] = b"lu\0";
422pub const PRIxFAST32: &[u8; 3] = b"lx\0";
423pub const PRIXFAST32: &[u8; 3] = b"lX\0";
424pub const PRIo64: &[u8; 3] = b"lo\0";
425pub const PRIu64: &[u8; 3] = b"lu\0";
426pub const PRIx64: &[u8; 3] = b"lx\0";
427pub const PRIX64: &[u8; 3] = b"lX\0";
428pub const PRIoLEAST64: &[u8; 3] = b"lo\0";
429pub const PRIuLEAST64: &[u8; 3] = b"lu\0";
430pub const PRIxLEAST64: &[u8; 3] = b"lx\0";
431pub const PRIXLEAST64: &[u8; 3] = b"lX\0";
432pub const PRIoFAST64: &[u8; 3] = b"lo\0";
433pub const PRIuFAST64: &[u8; 3] = b"lu\0";
434pub const PRIxFAST64: &[u8; 3] = b"lx\0";
435pub const PRIXFAST64: &[u8; 3] = b"lX\0";
436pub const PRIoMAX: &[u8; 3] = b"lo\0";
437pub const PRIuMAX: &[u8; 3] = b"lu\0";
438pub const PRIxMAX: &[u8; 3] = b"lx\0";
439pub const PRIXMAX: &[u8; 3] = b"lX\0";
440pub const PRIoPTR: &[u8; 3] = b"lo\0";
441pub const PRIuPTR: &[u8; 3] = b"lu\0";
442pub const PRIxPTR: &[u8; 3] = b"lx\0";
443pub const PRIXPTR: &[u8; 3] = b"lX\0";
444pub const SCNu32: &[u8; 2] = b"u\0";
445pub const SCNu64: &[u8; 3] = b"lu\0";
446pub const SCNuMAX: &[u8; 3] = b"lu\0";
447pub const SCNx16: &[u8; 3] = b"hx\0";
448pub const SCNx32: &[u8; 2] = b"x\0";
449pub const SCNx64: &[u8; 3] = b"lx\0";
450pub const SCNxMAX: &[u8; 3] = b"lx\0";
451pub const SCNi8: &[u8; 4] = b"hhi\0";
452pub const SCNxPTR: &[u8; 3] = b"lx\0";
453pub const SCNi64: &[u8; 3] = b"li\0";
454pub const SCNd32: &[u8; 2] = b"d\0";
455pub const SCNd64: &[u8; 3] = b"ld\0";
456pub const SCNdFAST64: &[u8; 3] = b"ld\0";
457pub const SCNu16: &[u8; 3] = b"hu\0";
458pub const DEBUG_BALLOC: u32 = 1;
459pub const DEBUG_BCACHE: u32 = 2;
460pub const DEBUG_BITMAP: u32 = 4;
461pub const DEBUG_BLOCK_GROUP: u32 = 8;
462pub const DEBUG_BLOCKDEV: u32 = 16;
463pub const DEBUG_DIR_IDX: u32 = 32;
464pub const DEBUG_DIR: u32 = 64;
465pub const DEBUG_EXTENT: u32 = 128;
466pub const DEBUG_FS: u32 = 256;
467pub const DEBUG_HASH: u32 = 512;
468pub const DEBUG_IALLOC: u32 = 1024;
469pub const DEBUG_INODE: u32 = 2048;
470pub const DEBUG_SUPER: u32 = 4096;
471pub const DEBUG_XATTR: u32 = 8192;
472pub const DEBUG_MKFS: u32 = 16384;
473pub const DEBUG_EXT4: u32 = 32768;
474pub const DEBUG_JBD: u32 = 65536;
475pub const DEBUG_MBR: u32 = 131072;
476pub const DEBUG_NOPREFIX: u32 = 2147483648;
477pub const DEBUG_ALL: u32 = 4294967295;
478pub const DBG_NONE: &[u8; 1] = b"\0";
479pub const DBG_INFO: &[u8; 9] = b"[info]  \0";
480pub const DBG_WARN: &[u8; 9] = b"[warn]  \0";
481pub const DBG_ERROR: &[u8; 9] = b"[error] \0";
482pub const SEEK_DATA: u32 = 3;
483pub const SEEK_HOLE: u32 = 4;
484pub const __MLIBC_BSD_OPTION: u32 = 1;
485pub const __MLIBC_POSIX_OPTION: u32 = 1;
486pub const __MLIBC_LINUX_OPTION: u32 = 0;
487pub const __MLIBC_GLIBC_OPTION: u32 = 1;
488pub const __MLIBC_SYSDEP_HAS_BITS_SYSCALL_H: u32 = 0;
489pub const __MLIBC_EOF_BIT: u32 = 1;
490pub const __MLIBC_ERROR_BIT: u32 = 2;
491pub const _IOFBF: u32 = 1;
492pub const _IOLBF: u32 = 2;
493pub const _IONBF: u32 = 3;
494pub const BUFSIZ: u32 = 512;
495pub const EOF: i32 = -1;
496pub const FOPEN_MAX: u32 = 1024;
497pub const FILENAME_MAX: u32 = 256;
498pub const L_tmpnam: u32 = 256;
499pub const TMP_MAX: u32 = 1024;
500pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
501pub const RENAME_EXCHANGE: u32 = 2;
502pub type __mlibc_uint8 = ::std::os::raw::c_uchar;
503pub type __mlibc_uint16 = ::std::os::raw::c_ushort;
504pub type __mlibc_uint32 = ::std::os::raw::c_uint;
505pub type __mlibc_uint64 = ::std::os::raw::c_ulong;
506pub type __mlibc_int8 = ::std::os::raw::c_schar;
507pub type __mlibc_int16 = ::std::os::raw::c_short;
508pub type __mlibc_int32 = ::std::os::raw::c_int;
509pub type __mlibc_int64 = ::std::os::raw::c_long;
510pub type __mlibc_int_fast8 = __mlibc_int8;
511pub type __mlibc_int_fast16 = __mlibc_int64;
512pub type __mlibc_int_fast32 = __mlibc_int64;
513pub type __mlibc_int_fast64 = __mlibc_int64;
514pub type __mlibc_uint_fast8 = __mlibc_uint8;
515pub type __mlibc_uint_fast16 = __mlibc_uint64;
516pub type __mlibc_uint_fast32 = __mlibc_uint64;
517pub type __mlibc_uint_fast64 = __mlibc_uint64;
518pub type __mlibc_intmax = ::std::os::raw::c_long;
519pub type __mlibc_intptr = ::std::os::raw::c_long;
520pub type __mlibc_ptrdiff = ::std::os::raw::c_long;
521pub type __mlibc_uintmax = ::std::os::raw::c_ulong;
522pub type __mlibc_uintptr = ::std::os::raw::c_ulong;
523pub type __mlibc_size = ::std::os::raw::c_ulong;
524pub type int_least8_t = __mlibc_int8;
525pub type int_least16_t = __mlibc_int16;
526pub type int_least32_t = __mlibc_int32;
527pub type int_least64_t = __mlibc_int64;
528pub type uint_least8_t = __mlibc_uint8;
529pub type uint_least16_t = __mlibc_uint16;
530pub type uint_least32_t = __mlibc_uint32;
531pub type uint_least64_t = __mlibc_uint64;
532pub type int_fast8_t = __mlibc_int_fast8;
533pub type int_fast16_t = __mlibc_int_fast16;
534pub type int_fast32_t = __mlibc_int_fast32;
535pub type int_fast64_t = __mlibc_int_fast64;
536pub type uint_fast8_t = __mlibc_uint_fast8;
537pub type uint_fast16_t = __mlibc_uint_fast16;
538pub type uint_fast32_t = __mlibc_uint_fast32;
539pub type uint_fast64_t = __mlibc_uint_fast64;
540pub type intmax_t = __mlibc_intmax;
541pub type uintmax_t = __mlibc_uintmax;
542pub type wchar_t = ::std::os::raw::c_int;
543#[repr(C)]
544#[repr(align(16))]
545#[derive(Debug, Copy, Clone)]
546pub struct max_align_t {
547    pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
548    pub __bindgen_padding_0: u64,
549    pub __clang_max_align_nonce2: u128,
550}
551#[allow(clippy::unnecessary_operation, clippy::identity_op)]
552const _: () = {
553    ["Size of max_align_t"][::std::mem::size_of::<max_align_t>() - 32usize];
554    ["Alignment of max_align_t"][::std::mem::align_of::<max_align_t>() - 16usize];
555    ["Offset of field: max_align_t::__clang_max_align_nonce1"]
556        [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize];
557    ["Offset of field: max_align_t::__clang_max_align_nonce2"]
558        [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize];
559};
560#[doc = "@brief   Single block descriptor"]
561#[repr(C)]
562#[derive(Debug, Copy, Clone)]
563pub struct ext4_block {
564    #[doc = "@brief   Logical block ID"]
565    pub lb_id: u64,
566    #[doc = "@brief   Buffer"]
567    pub buf: *mut ext4_buf,
568    #[doc = "@brief   Data buffer."]
569    pub data: *mut u8,
570}
571#[allow(clippy::unnecessary_operation, clippy::identity_op)]
572const _: () = {
573    ["Size of ext4_block"][::std::mem::size_of::<ext4_block>() - 24usize];
574    ["Alignment of ext4_block"][::std::mem::align_of::<ext4_block>() - 8usize];
575    ["Offset of field: ext4_block::lb_id"][::std::mem::offset_of!(ext4_block, lb_id) - 0usize];
576    ["Offset of field: ext4_block::buf"][::std::mem::offset_of!(ext4_block, buf) - 8usize];
577    ["Offset of field: ext4_block::data"][::std::mem::offset_of!(ext4_block, data) - 16usize];
578};
579pub const bcache_state_bits_BC_UPTODATE: bcache_state_bits = 0;
580pub const bcache_state_bits_BC_DIRTY: bcache_state_bits = 1;
581pub const bcache_state_bits_BC_FLUSH: bcache_state_bits = 2;
582pub const bcache_state_bits_BC_TMP: bcache_state_bits = 3;
583#[doc = "@brief buffer state bits\n\n  - BC_UPTODATE: Buffer contains valid data.\n  - BC_DIRTY: Buffer is dirty.\n  - BC_FLUSH: Buffer will be immediately flushed,\n              when no one references it.\n  - BC_TMP: Buffer will be dropped once its refctr\n            reaches zero."]
584pub type bcache_state_bits = ::std::os::raw::c_uint;
585#[doc = "@brief   Single block descriptor"]
586#[repr(C)]
587#[derive(Debug, Copy, Clone)]
588pub struct ext4_buf {
589    #[doc = "@brief   Flags"]
590    pub flags: [::std::os::raw::c_char; 4usize],
591    #[doc = "@brief   Logical block address"]
592    pub lba: u64,
593    #[doc = "@brief   Data buffer."]
594    pub data: *mut u8,
595    #[doc = "@brief   LRU priority. (unused)"]
596    pub lru_prio: u32,
597    #[doc = "@brief   LRU id."]
598    pub lru_id: u32,
599    #[doc = "@brief   Reference count table"]
600    pub refctr: u32,
601    #[doc = "@brief   The block cache this buffer belongs to."]
602    pub bc: *mut ext4_bcache,
603    #[doc = "@brief   Whether or not buffer is on dirty list."]
604    pub on_dirty_list: bool,
605    #[doc = "@brief   LBA tree node"]
606    pub lba_node: ext4_buf__bindgen_ty_1,
607    #[doc = "@brief   LRU tree node"]
608    pub lru_node: ext4_buf__bindgen_ty_2,
609    #[doc = "@brief   Dirty list node"]
610    pub dirty_node: ext4_buf__bindgen_ty_3,
611    #[doc = "@brief   Callback routine after a disk-write operation.\n @param   bc block cache descriptor\n @param   buf buffer descriptor\n @param   standard error code returned by bdev->bwrite()\n @param   arg argument passed to this routine"]
612    pub end_write: ::std::option::Option<
613        unsafe extern "C" fn(
614            bc: *mut ext4_bcache,
615            buf: *mut ext4_buf,
616            res: ::std::os::raw::c_int,
617            arg: *mut ::std::os::raw::c_void,
618        ),
619    >,
620    #[doc = "@brief   argument passed to end_write() callback."]
621    pub end_write_arg: *mut ::std::os::raw::c_void,
622}
623#[doc = "@brief   LBA tree node"]
624#[repr(C)]
625#[derive(Debug, Copy, Clone)]
626pub struct ext4_buf__bindgen_ty_1 {
627    pub rbe_left: *mut ext4_buf,
628    pub rbe_right: *mut ext4_buf,
629    pub rbe_parent: *mut ext4_buf,
630    pub rbe_color: ::std::os::raw::c_int,
631}
632#[allow(clippy::unnecessary_operation, clippy::identity_op)]
633const _: () = {
634    ["Size of ext4_buf__bindgen_ty_1"][::std::mem::size_of::<ext4_buf__bindgen_ty_1>() - 32usize];
635    ["Alignment of ext4_buf__bindgen_ty_1"]
636        [::std::mem::align_of::<ext4_buf__bindgen_ty_1>() - 8usize];
637    ["Offset of field: ext4_buf__bindgen_ty_1::rbe_left"]
638        [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_left) - 0usize];
639    ["Offset of field: ext4_buf__bindgen_ty_1::rbe_right"]
640        [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_right) - 8usize];
641    ["Offset of field: ext4_buf__bindgen_ty_1::rbe_parent"]
642        [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_parent) - 16usize];
643    ["Offset of field: ext4_buf__bindgen_ty_1::rbe_color"]
644        [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_color) - 24usize];
645};
646#[doc = "@brief   LRU tree node"]
647#[repr(C)]
648#[derive(Debug, Copy, Clone)]
649pub struct ext4_buf__bindgen_ty_2 {
650    pub rbe_left: *mut ext4_buf,
651    pub rbe_right: *mut ext4_buf,
652    pub rbe_parent: *mut ext4_buf,
653    pub rbe_color: ::std::os::raw::c_int,
654}
655#[allow(clippy::unnecessary_operation, clippy::identity_op)]
656const _: () = {
657    ["Size of ext4_buf__bindgen_ty_2"][::std::mem::size_of::<ext4_buf__bindgen_ty_2>() - 32usize];
658    ["Alignment of ext4_buf__bindgen_ty_2"]
659        [::std::mem::align_of::<ext4_buf__bindgen_ty_2>() - 8usize];
660    ["Offset of field: ext4_buf__bindgen_ty_2::rbe_left"]
661        [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_left) - 0usize];
662    ["Offset of field: ext4_buf__bindgen_ty_2::rbe_right"]
663        [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_right) - 8usize];
664    ["Offset of field: ext4_buf__bindgen_ty_2::rbe_parent"]
665        [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_parent) - 16usize];
666    ["Offset of field: ext4_buf__bindgen_ty_2::rbe_color"]
667        [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_color) - 24usize];
668};
669#[doc = "@brief   Dirty list node"]
670#[repr(C)]
671#[derive(Debug, Copy, Clone)]
672pub struct ext4_buf__bindgen_ty_3 {
673    pub sle_next: *mut ext4_buf,
674}
675#[allow(clippy::unnecessary_operation, clippy::identity_op)]
676const _: () = {
677    ["Size of ext4_buf__bindgen_ty_3"][::std::mem::size_of::<ext4_buf__bindgen_ty_3>() - 8usize];
678    ["Alignment of ext4_buf__bindgen_ty_3"]
679        [::std::mem::align_of::<ext4_buf__bindgen_ty_3>() - 8usize];
680    ["Offset of field: ext4_buf__bindgen_ty_3::sle_next"]
681        [::std::mem::offset_of!(ext4_buf__bindgen_ty_3, sle_next) - 0usize];
682};
683#[allow(clippy::unnecessary_operation, clippy::identity_op)]
684const _: () = {
685    ["Size of ext4_buf"][::std::mem::size_of::<ext4_buf>() - 144usize];
686    ["Alignment of ext4_buf"][::std::mem::align_of::<ext4_buf>() - 8usize];
687    ["Offset of field: ext4_buf::flags"][::std::mem::offset_of!(ext4_buf, flags) - 0usize];
688    ["Offset of field: ext4_buf::lba"][::std::mem::offset_of!(ext4_buf, lba) - 8usize];
689    ["Offset of field: ext4_buf::data"][::std::mem::offset_of!(ext4_buf, data) - 16usize];
690    ["Offset of field: ext4_buf::lru_prio"][::std::mem::offset_of!(ext4_buf, lru_prio) - 24usize];
691    ["Offset of field: ext4_buf::lru_id"][::std::mem::offset_of!(ext4_buf, lru_id) - 28usize];
692    ["Offset of field: ext4_buf::refctr"][::std::mem::offset_of!(ext4_buf, refctr) - 32usize];
693    ["Offset of field: ext4_buf::bc"][::std::mem::offset_of!(ext4_buf, bc) - 40usize];
694    ["Offset of field: ext4_buf::on_dirty_list"]
695        [::std::mem::offset_of!(ext4_buf, on_dirty_list) - 48usize];
696    ["Offset of field: ext4_buf::lba_node"][::std::mem::offset_of!(ext4_buf, lba_node) - 56usize];
697    ["Offset of field: ext4_buf::lru_node"][::std::mem::offset_of!(ext4_buf, lru_node) - 88usize];
698    ["Offset of field: ext4_buf::dirty_node"]
699        [::std::mem::offset_of!(ext4_buf, dirty_node) - 120usize];
700    ["Offset of field: ext4_buf::end_write"]
701        [::std::mem::offset_of!(ext4_buf, end_write) - 128usize];
702    ["Offset of field: ext4_buf::end_write_arg"]
703        [::std::mem::offset_of!(ext4_buf, end_write_arg) - 136usize];
704};
705#[doc = "@brief   Block cache descriptor"]
706#[repr(C)]
707#[derive(Debug, Copy, Clone)]
708pub struct ext4_bcache {
709    #[doc = "@brief   Item count in block cache"]
710    pub cnt: u32,
711    #[doc = "@brief   Item size in block cache"]
712    pub itemsize: u32,
713    #[doc = "@brief   Last recently used counter"]
714    pub lru_ctr: u32,
715    #[doc = "@brief   Currently referenced datablocks"]
716    pub ref_blocks: u32,
717    #[doc = "@brief   Maximum referenced datablocks"]
718    pub max_ref_blocks: u32,
719    #[doc = "@brief   The blockdev binded to this block cache"]
720    pub bdev: *mut ext4_blockdev,
721    #[doc = "@brief   The cache should not be shaked"]
722    pub dont_shake: bool,
723    #[doc = "@brief   A tree holding all bufs"]
724    pub lba_root: ext4_bcache_ext4_buf_lba,
725    #[doc = "@brief   A tree holding unreferenced bufs"]
726    pub lru_root: ext4_bcache_ext4_buf_lru,
727    #[doc = "@brief   A singly-linked list holding dirty buffers"]
728    pub dirty_list: ext4_bcache_ext4_buf_dirty,
729}
730#[doc = "@brief   A tree holding all bufs"]
731#[repr(C)]
732#[derive(Debug, Copy, Clone)]
733pub struct ext4_bcache_ext4_buf_lba {
734    pub rbh_root: *mut ext4_buf,
735}
736#[allow(clippy::unnecessary_operation, clippy::identity_op)]
737const _: () = {
738    ["Size of ext4_bcache_ext4_buf_lba"]
739        [::std::mem::size_of::<ext4_bcache_ext4_buf_lba>() - 8usize];
740    ["Alignment of ext4_bcache_ext4_buf_lba"]
741        [::std::mem::align_of::<ext4_bcache_ext4_buf_lba>() - 8usize];
742    ["Offset of field: ext4_bcache_ext4_buf_lba::rbh_root"]
743        [::std::mem::offset_of!(ext4_bcache_ext4_buf_lba, rbh_root) - 0usize];
744};
745#[doc = "@brief   A tree holding unreferenced bufs"]
746#[repr(C)]
747#[derive(Debug, Copy, Clone)]
748pub struct ext4_bcache_ext4_buf_lru {
749    pub rbh_root: *mut ext4_buf,
750}
751#[allow(clippy::unnecessary_operation, clippy::identity_op)]
752const _: () = {
753    ["Size of ext4_bcache_ext4_buf_lru"]
754        [::std::mem::size_of::<ext4_bcache_ext4_buf_lru>() - 8usize];
755    ["Alignment of ext4_bcache_ext4_buf_lru"]
756        [::std::mem::align_of::<ext4_bcache_ext4_buf_lru>() - 8usize];
757    ["Offset of field: ext4_bcache_ext4_buf_lru::rbh_root"]
758        [::std::mem::offset_of!(ext4_bcache_ext4_buf_lru, rbh_root) - 0usize];
759};
760#[doc = "@brief   A singly-linked list holding dirty buffers"]
761#[repr(C)]
762#[derive(Debug, Copy, Clone)]
763pub struct ext4_bcache_ext4_buf_dirty {
764    pub slh_first: *mut ext4_buf,
765}
766#[allow(clippy::unnecessary_operation, clippy::identity_op)]
767const _: () = {
768    ["Size of ext4_bcache_ext4_buf_dirty"]
769        [::std::mem::size_of::<ext4_bcache_ext4_buf_dirty>() - 8usize];
770    ["Alignment of ext4_bcache_ext4_buf_dirty"]
771        [::std::mem::align_of::<ext4_bcache_ext4_buf_dirty>() - 8usize];
772    ["Offset of field: ext4_bcache_ext4_buf_dirty::slh_first"]
773        [::std::mem::offset_of!(ext4_bcache_ext4_buf_dirty, slh_first) - 0usize];
774};
775#[allow(clippy::unnecessary_operation, clippy::identity_op)]
776const _: () = {
777    ["Size of ext4_bcache"][::std::mem::size_of::<ext4_bcache>() - 64usize];
778    ["Alignment of ext4_bcache"][::std::mem::align_of::<ext4_bcache>() - 8usize];
779    ["Offset of field: ext4_bcache::cnt"][::std::mem::offset_of!(ext4_bcache, cnt) - 0usize];
780    ["Offset of field: ext4_bcache::itemsize"]
781        [::std::mem::offset_of!(ext4_bcache, itemsize) - 4usize];
782    ["Offset of field: ext4_bcache::lru_ctr"]
783        [::std::mem::offset_of!(ext4_bcache, lru_ctr) - 8usize];
784    ["Offset of field: ext4_bcache::ref_blocks"]
785        [::std::mem::offset_of!(ext4_bcache, ref_blocks) - 12usize];
786    ["Offset of field: ext4_bcache::max_ref_blocks"]
787        [::std::mem::offset_of!(ext4_bcache, max_ref_blocks) - 16usize];
788    ["Offset of field: ext4_bcache::bdev"][::std::mem::offset_of!(ext4_bcache, bdev) - 24usize];
789    ["Offset of field: ext4_bcache::dont_shake"]
790        [::std::mem::offset_of!(ext4_bcache, dont_shake) - 32usize];
791    ["Offset of field: ext4_bcache::lba_root"]
792        [::std::mem::offset_of!(ext4_bcache, lba_root) - 40usize];
793    ["Offset of field: ext4_bcache::lru_root"]
794        [::std::mem::offset_of!(ext4_bcache, lru_root) - 48usize];
795    ["Offset of field: ext4_bcache::dirty_list"]
796        [::std::mem::offset_of!(ext4_bcache, dirty_list) - 56usize];
797};
798unsafe extern "C" {
799    #[doc = "@brief   Dynamic initialization of block cache.\n @param   bc block cache descriptor\n @param   cnt items count in block cache\n @param   itemsize single item size (in bytes)\n @return  standard error code"]
800    pub fn ext4_bcache_init_dynamic(
801        bc: *mut ext4_bcache,
802        cnt: u32,
803        itemsize: u32,
804    ) -> ::std::os::raw::c_int;
805}
806unsafe extern "C" {
807    #[doc = "@brief   Do cleanup works on block cache.\n @param   bc block cache descriptor."]
808    pub fn ext4_bcache_cleanup(bc: *mut ext4_bcache);
809}
810unsafe extern "C" {
811    #[doc = "@brief   Dynamic de-initialization of block cache.\n @param   bc block cache descriptor\n @return  standard error code"]
812    pub fn ext4_bcache_fini_dynamic(bc: *mut ext4_bcache) -> ::std::os::raw::c_int;
813}
814unsafe extern "C" {
815    #[doc = "@brief   Get a buffer with the lowest LRU counter in bcache.\n @param   bc block cache descriptor\n @return  buffer with the lowest LRU counter"]
816    pub fn ext4_buf_lowest_lru(bc: *mut ext4_bcache) -> *mut ext4_buf;
817}
818unsafe extern "C" {
819    #[doc = "@brief   Drop unreferenced buffer from bcache.\n @param   bc block cache descriptor\n @param   buf buffer"]
820    pub fn ext4_bcache_drop_buf(bc: *mut ext4_bcache, buf: *mut ext4_buf);
821}
822unsafe extern "C" {
823    #[doc = "@brief   Invalidate a range of buffers.\n @param   bc block cache descriptor\n @param   from starting lba\n @param   cnt block counts"]
824    pub fn ext4_bcache_invalidate_lba(bc: *mut ext4_bcache, from: u64, cnt: u32);
825}
826unsafe extern "C" {
827    #[doc = "@brief   Find existing buffer from block cache memory.\n          Unreferenced block allocation is based on LRU\n          (Last Recently Used) algorithm.\n @param   bc block cache descriptor\n @param   b block to alloc\n @param   lba logical block address\n @return  block cache buffer"]
828    pub fn ext4_bcache_find_get(
829        bc: *mut ext4_bcache,
830        b: *mut ext4_block,
831        lba: u64,
832    ) -> *mut ext4_buf;
833}
834unsafe extern "C" {
835    #[doc = "@brief   Allocate block from block cache memory.\n          Unreferenced block allocation is based on LRU\n          (Last Recently Used) algorithm.\n @param   bc block cache descriptor\n @param   b block to alloc\n @param   is_new block is new (needs to be read)\n @return  standard error code"]
836    pub fn ext4_bcache_alloc(
837        bc: *mut ext4_bcache,
838        b: *mut ext4_block,
839        is_new: *mut bool,
840    ) -> ::std::os::raw::c_int;
841}
842unsafe extern "C" {
843    #[doc = "@brief   Free block from cache memory (decrement reference counter).\n @param   bc block cache descriptor\n @param   b block to free\n @return  standard error code"]
844    pub fn ext4_bcache_free(bc: *mut ext4_bcache, b: *mut ext4_block) -> ::std::os::raw::c_int;
845}
846unsafe extern "C" {
847    #[doc = "@brief   Return a full status of block cache.\n @param   bc block cache descriptor\n @return  full status"]
848    pub fn ext4_bcache_is_full(bc: *mut ext4_bcache) -> bool;
849}
850#[repr(C)]
851#[derive(Debug, Copy, Clone)]
852pub struct ext4_blockdev_iface {
853    #[doc = "@brief   Open device function\n @param   bdev block device."]
854    pub open: ::std::option::Option<
855        unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
856    >,
857    #[doc = "@brief   Block read function.\n @param   bdev block device\n @param   buf output buffer\n @param   blk_id block id\n @param   blk_cnt block count"]
858    pub bread: ::std::option::Option<
859        unsafe extern "C" fn(
860            bdev: *mut ext4_blockdev,
861            buf: *mut ::std::os::raw::c_void,
862            blk_id: u64,
863            blk_cnt: u32,
864        ) -> ::std::os::raw::c_int,
865    >,
866    #[doc = "@brief   Block write function.\n @param   buf input buffer\n @param   blk_id block id\n @param   blk_cnt block count"]
867    pub bwrite: ::std::option::Option<
868        unsafe extern "C" fn(
869            bdev: *mut ext4_blockdev,
870            buf: *const ::std::os::raw::c_void,
871            blk_id: u64,
872            blk_cnt: u32,
873        ) -> ::std::os::raw::c_int,
874    >,
875    #[doc = "@brief   Close device function.\n @param   bdev block device."]
876    pub close: ::std::option::Option<
877        unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
878    >,
879    #[doc = "@brief   Lock block device. Required in multi partition mode\n          operations. Not mandatory field.\n @param   bdev block device."]
880    pub lock: ::std::option::Option<
881        unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
882    >,
883    #[doc = "@brief   Unlock block device. Required in multi partition mode\n          operations. Not mandatory field.\n @param   bdev block device."]
884    pub unlock: ::std::option::Option<
885        unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
886    >,
887    #[doc = "@brief   Block size (bytes): physical"]
888    pub ph_bsize: u32,
889    #[doc = "@brief   Block count: physical"]
890    pub ph_bcnt: u64,
891    #[doc = "@brief   Block size buffer: physical"]
892    pub ph_bbuf: *mut u8,
893    #[doc = "@brief   Reference counter to block device interface"]
894    pub ph_refctr: u32,
895    #[doc = "@brief   Physical read counter"]
896    pub bread_ctr: u32,
897    #[doc = "@brief   Physical write counter"]
898    pub bwrite_ctr: u32,
899    #[doc = "@brief   User data pointer"]
900    pub p_user: *mut ::std::os::raw::c_void,
901}
902#[allow(clippy::unnecessary_operation, clippy::identity_op)]
903const _: () = {
904    ["Size of ext4_blockdev_iface"][::std::mem::size_of::<ext4_blockdev_iface>() - 96usize];
905    ["Alignment of ext4_blockdev_iface"][::std::mem::align_of::<ext4_blockdev_iface>() - 8usize];
906    ["Offset of field: ext4_blockdev_iface::open"]
907        [::std::mem::offset_of!(ext4_blockdev_iface, open) - 0usize];
908    ["Offset of field: ext4_blockdev_iface::bread"]
909        [::std::mem::offset_of!(ext4_blockdev_iface, bread) - 8usize];
910    ["Offset of field: ext4_blockdev_iface::bwrite"]
911        [::std::mem::offset_of!(ext4_blockdev_iface, bwrite) - 16usize];
912    ["Offset of field: ext4_blockdev_iface::close"]
913        [::std::mem::offset_of!(ext4_blockdev_iface, close) - 24usize];
914    ["Offset of field: ext4_blockdev_iface::lock"]
915        [::std::mem::offset_of!(ext4_blockdev_iface, lock) - 32usize];
916    ["Offset of field: ext4_blockdev_iface::unlock"]
917        [::std::mem::offset_of!(ext4_blockdev_iface, unlock) - 40usize];
918    ["Offset of field: ext4_blockdev_iface::ph_bsize"]
919        [::std::mem::offset_of!(ext4_blockdev_iface, ph_bsize) - 48usize];
920    ["Offset of field: ext4_blockdev_iface::ph_bcnt"]
921        [::std::mem::offset_of!(ext4_blockdev_iface, ph_bcnt) - 56usize];
922    ["Offset of field: ext4_blockdev_iface::ph_bbuf"]
923        [::std::mem::offset_of!(ext4_blockdev_iface, ph_bbuf) - 64usize];
924    ["Offset of field: ext4_blockdev_iface::ph_refctr"]
925        [::std::mem::offset_of!(ext4_blockdev_iface, ph_refctr) - 72usize];
926    ["Offset of field: ext4_blockdev_iface::bread_ctr"]
927        [::std::mem::offset_of!(ext4_blockdev_iface, bread_ctr) - 76usize];
928    ["Offset of field: ext4_blockdev_iface::bwrite_ctr"]
929        [::std::mem::offset_of!(ext4_blockdev_iface, bwrite_ctr) - 80usize];
930    ["Offset of field: ext4_blockdev_iface::p_user"]
931        [::std::mem::offset_of!(ext4_blockdev_iface, p_user) - 88usize];
932};
933#[doc = "@brief   Definition of the simple block device."]
934#[repr(C)]
935#[derive(Debug, Copy, Clone)]
936pub struct ext4_blockdev {
937    #[doc = "@brief Block device interface"]
938    pub bdif: *mut ext4_blockdev_iface,
939    #[doc = "@brief Offset in bdif. For multi partition mode."]
940    pub part_offset: u64,
941    #[doc = "@brief Part size in bdif. For multi partition mode."]
942    pub part_size: u64,
943    #[doc = "@brief   Block cache."]
944    pub bc: *mut ext4_bcache,
945    #[doc = "@brief   Block size (bytes) logical"]
946    pub lg_bsize: u32,
947    #[doc = "@brief   Block count: logical"]
948    pub lg_bcnt: u64,
949    #[doc = "@brief   Cache write back mode reference counter"]
950    pub cache_write_back: u32,
951    #[doc = "@brief   The filesystem this block device belongs to."]
952    pub fs: *mut ext4_fs,
953    pub journal: *mut ::std::os::raw::c_void,
954}
955#[allow(clippy::unnecessary_operation, clippy::identity_op)]
956const _: () = {
957    ["Size of ext4_blockdev"][::std::mem::size_of::<ext4_blockdev>() - 72usize];
958    ["Alignment of ext4_blockdev"][::std::mem::align_of::<ext4_blockdev>() - 8usize];
959    ["Offset of field: ext4_blockdev::bdif"][::std::mem::offset_of!(ext4_blockdev, bdif) - 0usize];
960    ["Offset of field: ext4_blockdev::part_offset"]
961        [::std::mem::offset_of!(ext4_blockdev, part_offset) - 8usize];
962    ["Offset of field: ext4_blockdev::part_size"]
963        [::std::mem::offset_of!(ext4_blockdev, part_size) - 16usize];
964    ["Offset of field: ext4_blockdev::bc"][::std::mem::offset_of!(ext4_blockdev, bc) - 24usize];
965    ["Offset of field: ext4_blockdev::lg_bsize"]
966        [::std::mem::offset_of!(ext4_blockdev, lg_bsize) - 32usize];
967    ["Offset of field: ext4_blockdev::lg_bcnt"]
968        [::std::mem::offset_of!(ext4_blockdev, lg_bcnt) - 40usize];
969    ["Offset of field: ext4_blockdev::cache_write_back"]
970        [::std::mem::offset_of!(ext4_blockdev, cache_write_back) - 48usize];
971    ["Offset of field: ext4_blockdev::fs"][::std::mem::offset_of!(ext4_blockdev, fs) - 56usize];
972    ["Offset of field: ext4_blockdev::journal"]
973        [::std::mem::offset_of!(ext4_blockdev, journal) - 64usize];
974};
975unsafe extern "C" {
976    #[doc = "@brief   Block device initialization.\n @param   bdev block device descriptor\n @return  standard error code"]
977    pub fn ext4_block_init(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int;
978}
979unsafe extern "C" {
980    #[doc = "@brief   Binds a bcache to block device.\n @param   bdev block device descriptor\n @param   bc block cache descriptor\n @return  standard error code"]
981    pub fn ext4_block_bind_bcache(
982        bdev: *mut ext4_blockdev,
983        bc: *mut ext4_bcache,
984    ) -> ::std::os::raw::c_int;
985}
986unsafe extern "C" {
987    #[doc = "@brief   Close block device\n @param   bdev block device descriptor\n @return  standard error code"]
988    pub fn ext4_block_fini(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int;
989}
990unsafe extern "C" {
991    #[doc = "@brief   Flush data in given buffer to disk.\n @param   bdev block device descriptor\n @param   buf buffer\n @return  standard error code"]
992    pub fn ext4_block_flush_buf(
993        bdev: *mut ext4_blockdev,
994        buf: *mut ext4_buf,
995    ) -> ::std::os::raw::c_int;
996}
997unsafe extern "C" {
998    #[doc = "@brief   Flush data in buffer of given lba to disk,\n          if that buffer exists in block cache.\n @param   bdev block device descriptor\n @param   lba logical block address\n @return  standard error code"]
999    pub fn ext4_block_flush_lba(bdev: *mut ext4_blockdev, lba: u64) -> ::std::os::raw::c_int;
1000}
1001unsafe extern "C" {
1002    #[doc = "@brief   Set logical block size in block device.\n @param   bdev block device descriptor\n @param   lb_bsize logical block size (in bytes)"]
1003    pub fn ext4_block_set_lb_size(bdev: *mut ext4_blockdev, lb_bsize: u32);
1004}
1005unsafe extern "C" {
1006    #[doc = "@brief   Block get function (through cache, don't read).\n @param   bdev block device descriptor\n @param   b block descriptor\n @param   lba logical block address\n @return  standard error code"]
1007    pub fn ext4_block_get_noread(
1008        bdev: *mut ext4_blockdev,
1009        b: *mut ext4_block,
1010        lba: u64,
1011    ) -> ::std::os::raw::c_int;
1012}
1013unsafe extern "C" {
1014    #[doc = "@brief   Block get function (through cache).\n @param   bdev block device descriptor\n @param   b block descriptor\n @param   lba logical block address\n @return  standard error code"]
1015    pub fn ext4_block_get(
1016        bdev: *mut ext4_blockdev,
1017        b: *mut ext4_block,
1018        lba: u64,
1019    ) -> ::std::os::raw::c_int;
1020}
1021unsafe extern "C" {
1022    #[doc = "@brief   Block set procedure (through cache).\n @param   bdev block device descriptor\n @param   b block descriptor\n @return  standard error code"]
1023    pub fn ext4_block_set(bdev: *mut ext4_blockdev, b: *mut ext4_block) -> ::std::os::raw::c_int;
1024}
1025unsafe extern "C" {
1026    #[doc = "@brief   Block read procedure (without cache)\n @param   bdev block device descriptor\n @param   buf output buffer\n @param   lba logical block address\n @return  standard error code"]
1027    pub fn ext4_blocks_get_direct(
1028        bdev: *mut ext4_blockdev,
1029        buf: *mut ::std::os::raw::c_void,
1030        lba: u64,
1031        cnt: u32,
1032    ) -> ::std::os::raw::c_int;
1033}
1034unsafe extern "C" {
1035    #[doc = "@brief   Block write procedure (without cache)\n @param   bdev block device descriptor\n @param   buf output buffer\n @param   lba logical block address\n @return  standard error code"]
1036    pub fn ext4_blocks_set_direct(
1037        bdev: *mut ext4_blockdev,
1038        buf: *const ::std::os::raw::c_void,
1039        lba: u64,
1040        cnt: u32,
1041    ) -> ::std::os::raw::c_int;
1042}
1043unsafe extern "C" {
1044    #[doc = "@brief   Write to block device (by direct address).\n @param   bdev block device descriptor\n @param   off byte offset in block device\n @param   buf input buffer\n @param   len length of the write buffer\n @return  standard error code"]
1045    pub fn ext4_block_writebytes(
1046        bdev: *mut ext4_blockdev,
1047        off: u64,
1048        buf: *const ::std::os::raw::c_void,
1049        len: u32,
1050    ) -> ::std::os::raw::c_int;
1051}
1052unsafe extern "C" {
1053    #[doc = "@brief   Read freom block device (by direct address).\n @param   bdev block device descriptor\n @param   off byte offset in block device\n @param   buf input buffer\n @param   len length of the write buffer\n @return  standard error code"]
1054    pub fn ext4_block_readbytes(
1055        bdev: *mut ext4_blockdev,
1056        off: u64,
1057        buf: *mut ::std::os::raw::c_void,
1058        len: u32,
1059    ) -> ::std::os::raw::c_int;
1060}
1061unsafe extern "C" {
1062    #[doc = "@brief   Flush all dirty buffers to disk\n @param   bdev block device descriptor\n @return  standard error code"]
1063    pub fn ext4_block_cache_flush(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int;
1064}
1065unsafe extern "C" {
1066    #[doc = "@brief   Enable/disable write back cache mode\n @param   bdev block device descriptor\n @param   on_off\n              !0 - ENABLE\n               0 - DISABLE (all delayed cache buffers will be flushed)\n @return  standard error code"]
1067    pub fn ext4_block_cache_write_back(
1068        bdev: *mut ext4_blockdev,
1069        on_off: u8,
1070    ) -> ::std::os::raw::c_int;
1071}
1072pub type ext4_lblk_t = u32;
1073pub type ext4_fsblk_t = u64;
1074#[repr(C, packed)]
1075#[derive(Debug, Copy, Clone)]
1076pub struct ext4_sblock {
1077    pub inodes_count: u32,
1078    pub blocks_count_lo: u32,
1079    pub reserved_blocks_count_lo: u32,
1080    pub free_blocks_count_lo: u32,
1081    pub free_inodes_count: u32,
1082    pub first_data_block: u32,
1083    pub log_block_size: u32,
1084    pub log_cluster_size: u32,
1085    pub blocks_per_group: u32,
1086    pub frags_per_group: u32,
1087    pub inodes_per_group: u32,
1088    pub mount_time: u32,
1089    pub write_time: u32,
1090    pub mount_count: u16,
1091    pub max_mount_count: u16,
1092    pub magic: u16,
1093    pub state: u16,
1094    pub errors: u16,
1095    pub minor_rev_level: u16,
1096    pub last_check_time: u32,
1097    pub check_interval: u32,
1098    pub creator_os: u32,
1099    pub rev_level: u32,
1100    pub def_resuid: u16,
1101    pub def_resgid: u16,
1102    pub first_inode: u32,
1103    pub inode_size: u16,
1104    pub block_group_index: u16,
1105    pub features_compatible: u32,
1106    pub features_incompatible: u32,
1107    pub features_read_only: u32,
1108    pub uuid: [u8; 16usize],
1109    pub volume_name: [::std::os::raw::c_char; 16usize],
1110    pub last_mounted: [::std::os::raw::c_char; 64usize],
1111    pub algorithm_usage_bitmap: u32,
1112    pub s_prealloc_blocks: u8,
1113    pub s_prealloc_dir_blocks: u8,
1114    pub s_reserved_gdt_blocks: u16,
1115    pub journal_uuid: [u8; 16usize],
1116    pub journal_inode_number: u32,
1117    pub journal_dev: u32,
1118    pub last_orphan: u32,
1119    pub hash_seed: [u32; 4usize],
1120    pub default_hash_version: u8,
1121    pub journal_backup_type: u8,
1122    pub desc_size: u16,
1123    pub default_mount_opts: u32,
1124    pub first_meta_bg: u32,
1125    pub mkfs_time: u32,
1126    pub journal_blocks: [u32; 17usize],
1127    pub blocks_count_hi: u32,
1128    pub reserved_blocks_count_hi: u32,
1129    pub free_blocks_count_hi: u32,
1130    pub min_extra_isize: u16,
1131    pub want_extra_isize: u16,
1132    pub flags: u32,
1133    pub raid_stride: u16,
1134    pub mmp_interval: u16,
1135    pub mmp_block: u64,
1136    pub raid_stripe_width: u32,
1137    pub log_groups_per_flex: u8,
1138    pub checksum_type: u8,
1139    pub reserved_pad: u16,
1140    pub kbytes_written: u64,
1141    pub snapshot_inum: u32,
1142    pub snapshot_id: u32,
1143    pub snapshot_r_blocks_count: u64,
1144    pub snapshot_list: u32,
1145    pub error_count: u32,
1146    pub first_error_time: u32,
1147    pub first_error_ino: u32,
1148    pub first_error_block: u64,
1149    pub first_error_func: [u8; 32usize],
1150    pub first_error_line: u32,
1151    pub last_error_time: u32,
1152    pub last_error_ino: u32,
1153    pub last_error_line: u32,
1154    pub last_error_block: u64,
1155    pub last_error_func: [u8; 32usize],
1156    pub mount_opts: [u8; 64usize],
1157    pub usr_quota_inum: u32,
1158    pub grp_quota_inum: u32,
1159    pub overhead_clusters: u32,
1160    pub backup_bgs: [u32; 2usize],
1161    pub encrypt_algos: [u8; 4usize],
1162    pub encrypt_pw_salt: [u8; 16usize],
1163    pub lpf_ino: u32,
1164    pub padding: [u32; 100usize],
1165    pub checksum: u32,
1166}
1167#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1168const _: () = {
1169    ["Size of ext4_sblock"][::std::mem::size_of::<ext4_sblock>() - 1024usize];
1170    ["Alignment of ext4_sblock"][::std::mem::align_of::<ext4_sblock>() - 1usize];
1171    ["Offset of field: ext4_sblock::inodes_count"]
1172        [::std::mem::offset_of!(ext4_sblock, inodes_count) - 0usize];
1173    ["Offset of field: ext4_sblock::blocks_count_lo"]
1174        [::std::mem::offset_of!(ext4_sblock, blocks_count_lo) - 4usize];
1175    ["Offset of field: ext4_sblock::reserved_blocks_count_lo"]
1176        [::std::mem::offset_of!(ext4_sblock, reserved_blocks_count_lo) - 8usize];
1177    ["Offset of field: ext4_sblock::free_blocks_count_lo"]
1178        [::std::mem::offset_of!(ext4_sblock, free_blocks_count_lo) - 12usize];
1179    ["Offset of field: ext4_sblock::free_inodes_count"]
1180        [::std::mem::offset_of!(ext4_sblock, free_inodes_count) - 16usize];
1181    ["Offset of field: ext4_sblock::first_data_block"]
1182        [::std::mem::offset_of!(ext4_sblock, first_data_block) - 20usize];
1183    ["Offset of field: ext4_sblock::log_block_size"]
1184        [::std::mem::offset_of!(ext4_sblock, log_block_size) - 24usize];
1185    ["Offset of field: ext4_sblock::log_cluster_size"]
1186        [::std::mem::offset_of!(ext4_sblock, log_cluster_size) - 28usize];
1187    ["Offset of field: ext4_sblock::blocks_per_group"]
1188        [::std::mem::offset_of!(ext4_sblock, blocks_per_group) - 32usize];
1189    ["Offset of field: ext4_sblock::frags_per_group"]
1190        [::std::mem::offset_of!(ext4_sblock, frags_per_group) - 36usize];
1191    ["Offset of field: ext4_sblock::inodes_per_group"]
1192        [::std::mem::offset_of!(ext4_sblock, inodes_per_group) - 40usize];
1193    ["Offset of field: ext4_sblock::mount_time"]
1194        [::std::mem::offset_of!(ext4_sblock, mount_time) - 44usize];
1195    ["Offset of field: ext4_sblock::write_time"]
1196        [::std::mem::offset_of!(ext4_sblock, write_time) - 48usize];
1197    ["Offset of field: ext4_sblock::mount_count"]
1198        [::std::mem::offset_of!(ext4_sblock, mount_count) - 52usize];
1199    ["Offset of field: ext4_sblock::max_mount_count"]
1200        [::std::mem::offset_of!(ext4_sblock, max_mount_count) - 54usize];
1201    ["Offset of field: ext4_sblock::magic"][::std::mem::offset_of!(ext4_sblock, magic) - 56usize];
1202    ["Offset of field: ext4_sblock::state"][::std::mem::offset_of!(ext4_sblock, state) - 58usize];
1203    ["Offset of field: ext4_sblock::errors"][::std::mem::offset_of!(ext4_sblock, errors) - 60usize];
1204    ["Offset of field: ext4_sblock::minor_rev_level"]
1205        [::std::mem::offset_of!(ext4_sblock, minor_rev_level) - 62usize];
1206    ["Offset of field: ext4_sblock::last_check_time"]
1207        [::std::mem::offset_of!(ext4_sblock, last_check_time) - 64usize];
1208    ["Offset of field: ext4_sblock::check_interval"]
1209        [::std::mem::offset_of!(ext4_sblock, check_interval) - 68usize];
1210    ["Offset of field: ext4_sblock::creator_os"]
1211        [::std::mem::offset_of!(ext4_sblock, creator_os) - 72usize];
1212    ["Offset of field: ext4_sblock::rev_level"]
1213        [::std::mem::offset_of!(ext4_sblock, rev_level) - 76usize];
1214    ["Offset of field: ext4_sblock::def_resuid"]
1215        [::std::mem::offset_of!(ext4_sblock, def_resuid) - 80usize];
1216    ["Offset of field: ext4_sblock::def_resgid"]
1217        [::std::mem::offset_of!(ext4_sblock, def_resgid) - 82usize];
1218    ["Offset of field: ext4_sblock::first_inode"]
1219        [::std::mem::offset_of!(ext4_sblock, first_inode) - 84usize];
1220    ["Offset of field: ext4_sblock::inode_size"]
1221        [::std::mem::offset_of!(ext4_sblock, inode_size) - 88usize];
1222    ["Offset of field: ext4_sblock::block_group_index"]
1223        [::std::mem::offset_of!(ext4_sblock, block_group_index) - 90usize];
1224    ["Offset of field: ext4_sblock::features_compatible"]
1225        [::std::mem::offset_of!(ext4_sblock, features_compatible) - 92usize];
1226    ["Offset of field: ext4_sblock::features_incompatible"]
1227        [::std::mem::offset_of!(ext4_sblock, features_incompatible) - 96usize];
1228    ["Offset of field: ext4_sblock::features_read_only"]
1229        [::std::mem::offset_of!(ext4_sblock, features_read_only) - 100usize];
1230    ["Offset of field: ext4_sblock::uuid"][::std::mem::offset_of!(ext4_sblock, uuid) - 104usize];
1231    ["Offset of field: ext4_sblock::volume_name"]
1232        [::std::mem::offset_of!(ext4_sblock, volume_name) - 120usize];
1233    ["Offset of field: ext4_sblock::last_mounted"]
1234        [::std::mem::offset_of!(ext4_sblock, last_mounted) - 136usize];
1235    ["Offset of field: ext4_sblock::algorithm_usage_bitmap"]
1236        [::std::mem::offset_of!(ext4_sblock, algorithm_usage_bitmap) - 200usize];
1237    ["Offset of field: ext4_sblock::s_prealloc_blocks"]
1238        [::std::mem::offset_of!(ext4_sblock, s_prealloc_blocks) - 204usize];
1239    ["Offset of field: ext4_sblock::s_prealloc_dir_blocks"]
1240        [::std::mem::offset_of!(ext4_sblock, s_prealloc_dir_blocks) - 205usize];
1241    ["Offset of field: ext4_sblock::s_reserved_gdt_blocks"]
1242        [::std::mem::offset_of!(ext4_sblock, s_reserved_gdt_blocks) - 206usize];
1243    ["Offset of field: ext4_sblock::journal_uuid"]
1244        [::std::mem::offset_of!(ext4_sblock, journal_uuid) - 208usize];
1245    ["Offset of field: ext4_sblock::journal_inode_number"]
1246        [::std::mem::offset_of!(ext4_sblock, journal_inode_number) - 224usize];
1247    ["Offset of field: ext4_sblock::journal_dev"]
1248        [::std::mem::offset_of!(ext4_sblock, journal_dev) - 228usize];
1249    ["Offset of field: ext4_sblock::last_orphan"]
1250        [::std::mem::offset_of!(ext4_sblock, last_orphan) - 232usize];
1251    ["Offset of field: ext4_sblock::hash_seed"]
1252        [::std::mem::offset_of!(ext4_sblock, hash_seed) - 236usize];
1253    ["Offset of field: ext4_sblock::default_hash_version"]
1254        [::std::mem::offset_of!(ext4_sblock, default_hash_version) - 252usize];
1255    ["Offset of field: ext4_sblock::journal_backup_type"]
1256        [::std::mem::offset_of!(ext4_sblock, journal_backup_type) - 253usize];
1257    ["Offset of field: ext4_sblock::desc_size"]
1258        [::std::mem::offset_of!(ext4_sblock, desc_size) - 254usize];
1259    ["Offset of field: ext4_sblock::default_mount_opts"]
1260        [::std::mem::offset_of!(ext4_sblock, default_mount_opts) - 256usize];
1261    ["Offset of field: ext4_sblock::first_meta_bg"]
1262        [::std::mem::offset_of!(ext4_sblock, first_meta_bg) - 260usize];
1263    ["Offset of field: ext4_sblock::mkfs_time"]
1264        [::std::mem::offset_of!(ext4_sblock, mkfs_time) - 264usize];
1265    ["Offset of field: ext4_sblock::journal_blocks"]
1266        [::std::mem::offset_of!(ext4_sblock, journal_blocks) - 268usize];
1267    ["Offset of field: ext4_sblock::blocks_count_hi"]
1268        [::std::mem::offset_of!(ext4_sblock, blocks_count_hi) - 336usize];
1269    ["Offset of field: ext4_sblock::reserved_blocks_count_hi"]
1270        [::std::mem::offset_of!(ext4_sblock, reserved_blocks_count_hi) - 340usize];
1271    ["Offset of field: ext4_sblock::free_blocks_count_hi"]
1272        [::std::mem::offset_of!(ext4_sblock, free_blocks_count_hi) - 344usize];
1273    ["Offset of field: ext4_sblock::min_extra_isize"]
1274        [::std::mem::offset_of!(ext4_sblock, min_extra_isize) - 348usize];
1275    ["Offset of field: ext4_sblock::want_extra_isize"]
1276        [::std::mem::offset_of!(ext4_sblock, want_extra_isize) - 350usize];
1277    ["Offset of field: ext4_sblock::flags"][::std::mem::offset_of!(ext4_sblock, flags) - 352usize];
1278    ["Offset of field: ext4_sblock::raid_stride"]
1279        [::std::mem::offset_of!(ext4_sblock, raid_stride) - 356usize];
1280    ["Offset of field: ext4_sblock::mmp_interval"]
1281        [::std::mem::offset_of!(ext4_sblock, mmp_interval) - 358usize];
1282    ["Offset of field: ext4_sblock::mmp_block"]
1283        [::std::mem::offset_of!(ext4_sblock, mmp_block) - 360usize];
1284    ["Offset of field: ext4_sblock::raid_stripe_width"]
1285        [::std::mem::offset_of!(ext4_sblock, raid_stripe_width) - 368usize];
1286    ["Offset of field: ext4_sblock::log_groups_per_flex"]
1287        [::std::mem::offset_of!(ext4_sblock, log_groups_per_flex) - 372usize];
1288    ["Offset of field: ext4_sblock::checksum_type"]
1289        [::std::mem::offset_of!(ext4_sblock, checksum_type) - 373usize];
1290    ["Offset of field: ext4_sblock::reserved_pad"]
1291        [::std::mem::offset_of!(ext4_sblock, reserved_pad) - 374usize];
1292    ["Offset of field: ext4_sblock::kbytes_written"]
1293        [::std::mem::offset_of!(ext4_sblock, kbytes_written) - 376usize];
1294    ["Offset of field: ext4_sblock::snapshot_inum"]
1295        [::std::mem::offset_of!(ext4_sblock, snapshot_inum) - 384usize];
1296    ["Offset of field: ext4_sblock::snapshot_id"]
1297        [::std::mem::offset_of!(ext4_sblock, snapshot_id) - 388usize];
1298    ["Offset of field: ext4_sblock::snapshot_r_blocks_count"]
1299        [::std::mem::offset_of!(ext4_sblock, snapshot_r_blocks_count) - 392usize];
1300    ["Offset of field: ext4_sblock::snapshot_list"]
1301        [::std::mem::offset_of!(ext4_sblock, snapshot_list) - 400usize];
1302    ["Offset of field: ext4_sblock::error_count"]
1303        [::std::mem::offset_of!(ext4_sblock, error_count) - 404usize];
1304    ["Offset of field: ext4_sblock::first_error_time"]
1305        [::std::mem::offset_of!(ext4_sblock, first_error_time) - 408usize];
1306    ["Offset of field: ext4_sblock::first_error_ino"]
1307        [::std::mem::offset_of!(ext4_sblock, first_error_ino) - 412usize];
1308    ["Offset of field: ext4_sblock::first_error_block"]
1309        [::std::mem::offset_of!(ext4_sblock, first_error_block) - 416usize];
1310    ["Offset of field: ext4_sblock::first_error_func"]
1311        [::std::mem::offset_of!(ext4_sblock, first_error_func) - 424usize];
1312    ["Offset of field: ext4_sblock::first_error_line"]
1313        [::std::mem::offset_of!(ext4_sblock, first_error_line) - 456usize];
1314    ["Offset of field: ext4_sblock::last_error_time"]
1315        [::std::mem::offset_of!(ext4_sblock, last_error_time) - 460usize];
1316    ["Offset of field: ext4_sblock::last_error_ino"]
1317        [::std::mem::offset_of!(ext4_sblock, last_error_ino) - 464usize];
1318    ["Offset of field: ext4_sblock::last_error_line"]
1319        [::std::mem::offset_of!(ext4_sblock, last_error_line) - 468usize];
1320    ["Offset of field: ext4_sblock::last_error_block"]
1321        [::std::mem::offset_of!(ext4_sblock, last_error_block) - 472usize];
1322    ["Offset of field: ext4_sblock::last_error_func"]
1323        [::std::mem::offset_of!(ext4_sblock, last_error_func) - 480usize];
1324    ["Offset of field: ext4_sblock::mount_opts"]
1325        [::std::mem::offset_of!(ext4_sblock, mount_opts) - 512usize];
1326    ["Offset of field: ext4_sblock::usr_quota_inum"]
1327        [::std::mem::offset_of!(ext4_sblock, usr_quota_inum) - 576usize];
1328    ["Offset of field: ext4_sblock::grp_quota_inum"]
1329        [::std::mem::offset_of!(ext4_sblock, grp_quota_inum) - 580usize];
1330    ["Offset of field: ext4_sblock::overhead_clusters"]
1331        [::std::mem::offset_of!(ext4_sblock, overhead_clusters) - 584usize];
1332    ["Offset of field: ext4_sblock::backup_bgs"]
1333        [::std::mem::offset_of!(ext4_sblock, backup_bgs) - 588usize];
1334    ["Offset of field: ext4_sblock::encrypt_algos"]
1335        [::std::mem::offset_of!(ext4_sblock, encrypt_algos) - 596usize];
1336    ["Offset of field: ext4_sblock::encrypt_pw_salt"]
1337        [::std::mem::offset_of!(ext4_sblock, encrypt_pw_salt) - 600usize];
1338    ["Offset of field: ext4_sblock::lpf_ino"]
1339        [::std::mem::offset_of!(ext4_sblock, lpf_ino) - 616usize];
1340    ["Offset of field: ext4_sblock::padding"]
1341        [::std::mem::offset_of!(ext4_sblock, padding) - 620usize];
1342    ["Offset of field: ext4_sblock::checksum"]
1343        [::std::mem::offset_of!(ext4_sblock, checksum) - 1020usize];
1344};
1345#[repr(C)]
1346#[derive(Debug, Copy, Clone)]
1347pub struct ext4_bgroup {
1348    pub block_bitmap_lo: u32,
1349    pub inode_bitmap_lo: u32,
1350    pub inode_table_first_block_lo: u32,
1351    pub free_blocks_count_lo: u16,
1352    pub free_inodes_count_lo: u16,
1353    pub used_dirs_count_lo: u16,
1354    pub flags: u16,
1355    pub exclude_bitmap_lo: u32,
1356    pub block_bitmap_csum_lo: u16,
1357    pub inode_bitmap_csum_lo: u16,
1358    pub itable_unused_lo: u16,
1359    pub checksum: u16,
1360    pub block_bitmap_hi: u32,
1361    pub inode_bitmap_hi: u32,
1362    pub inode_table_first_block_hi: u32,
1363    pub free_blocks_count_hi: u16,
1364    pub free_inodes_count_hi: u16,
1365    pub used_dirs_count_hi: u16,
1366    pub itable_unused_hi: u16,
1367    pub exclude_bitmap_hi: u32,
1368    pub block_bitmap_csum_hi: u16,
1369    pub inode_bitmap_csum_hi: u16,
1370    pub reserved: u32,
1371}
1372#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1373const _: () = {
1374    ["Size of ext4_bgroup"][::std::mem::size_of::<ext4_bgroup>() - 64usize];
1375    ["Alignment of ext4_bgroup"][::std::mem::align_of::<ext4_bgroup>() - 4usize];
1376    ["Offset of field: ext4_bgroup::block_bitmap_lo"]
1377        [::std::mem::offset_of!(ext4_bgroup, block_bitmap_lo) - 0usize];
1378    ["Offset of field: ext4_bgroup::inode_bitmap_lo"]
1379        [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_lo) - 4usize];
1380    ["Offset of field: ext4_bgroup::inode_table_first_block_lo"]
1381        [::std::mem::offset_of!(ext4_bgroup, inode_table_first_block_lo) - 8usize];
1382    ["Offset of field: ext4_bgroup::free_blocks_count_lo"]
1383        [::std::mem::offset_of!(ext4_bgroup, free_blocks_count_lo) - 12usize];
1384    ["Offset of field: ext4_bgroup::free_inodes_count_lo"]
1385        [::std::mem::offset_of!(ext4_bgroup, free_inodes_count_lo) - 14usize];
1386    ["Offset of field: ext4_bgroup::used_dirs_count_lo"]
1387        [::std::mem::offset_of!(ext4_bgroup, used_dirs_count_lo) - 16usize];
1388    ["Offset of field: ext4_bgroup::flags"][::std::mem::offset_of!(ext4_bgroup, flags) - 18usize];
1389    ["Offset of field: ext4_bgroup::exclude_bitmap_lo"]
1390        [::std::mem::offset_of!(ext4_bgroup, exclude_bitmap_lo) - 20usize];
1391    ["Offset of field: ext4_bgroup::block_bitmap_csum_lo"]
1392        [::std::mem::offset_of!(ext4_bgroup, block_bitmap_csum_lo) - 24usize];
1393    ["Offset of field: ext4_bgroup::inode_bitmap_csum_lo"]
1394        [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_csum_lo) - 26usize];
1395    ["Offset of field: ext4_bgroup::itable_unused_lo"]
1396        [::std::mem::offset_of!(ext4_bgroup, itable_unused_lo) - 28usize];
1397    ["Offset of field: ext4_bgroup::checksum"]
1398        [::std::mem::offset_of!(ext4_bgroup, checksum) - 30usize];
1399    ["Offset of field: ext4_bgroup::block_bitmap_hi"]
1400        [::std::mem::offset_of!(ext4_bgroup, block_bitmap_hi) - 32usize];
1401    ["Offset of field: ext4_bgroup::inode_bitmap_hi"]
1402        [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_hi) - 36usize];
1403    ["Offset of field: ext4_bgroup::inode_table_first_block_hi"]
1404        [::std::mem::offset_of!(ext4_bgroup, inode_table_first_block_hi) - 40usize];
1405    ["Offset of field: ext4_bgroup::free_blocks_count_hi"]
1406        [::std::mem::offset_of!(ext4_bgroup, free_blocks_count_hi) - 44usize];
1407    ["Offset of field: ext4_bgroup::free_inodes_count_hi"]
1408        [::std::mem::offset_of!(ext4_bgroup, free_inodes_count_hi) - 46usize];
1409    ["Offset of field: ext4_bgroup::used_dirs_count_hi"]
1410        [::std::mem::offset_of!(ext4_bgroup, used_dirs_count_hi) - 48usize];
1411    ["Offset of field: ext4_bgroup::itable_unused_hi"]
1412        [::std::mem::offset_of!(ext4_bgroup, itable_unused_hi) - 50usize];
1413    ["Offset of field: ext4_bgroup::exclude_bitmap_hi"]
1414        [::std::mem::offset_of!(ext4_bgroup, exclude_bitmap_hi) - 52usize];
1415    ["Offset of field: ext4_bgroup::block_bitmap_csum_hi"]
1416        [::std::mem::offset_of!(ext4_bgroup, block_bitmap_csum_hi) - 56usize];
1417    ["Offset of field: ext4_bgroup::inode_bitmap_csum_hi"]
1418        [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_csum_hi) - 58usize];
1419    ["Offset of field: ext4_bgroup::reserved"]
1420        [::std::mem::offset_of!(ext4_bgroup, reserved) - 60usize];
1421};
1422#[repr(C, packed)]
1423#[derive(Copy, Clone)]
1424pub struct ext4_inode {
1425    pub mode: u16,
1426    pub uid: u16,
1427    pub size_lo: u32,
1428    pub access_time: u32,
1429    pub change_inode_time: u32,
1430    pub modification_time: u32,
1431    pub deletion_time: u32,
1432    pub gid: u16,
1433    pub links_count: u16,
1434    pub blocks_count_lo: u32,
1435    pub flags: u32,
1436    pub unused_osd1: u32,
1437    pub blocks: [u32; 15usize],
1438    pub generation: u32,
1439    pub file_acl_lo: u32,
1440    pub size_hi: u32,
1441    pub obso_faddr: u32,
1442    pub osd2: ext4_inode__bindgen_ty_1,
1443    pub extra_isize: u16,
1444    pub checksum_hi: u16,
1445    pub ctime_extra: u32,
1446    pub mtime_extra: u32,
1447    pub atime_extra: u32,
1448    pub crtime: u32,
1449    pub crtime_extra: u32,
1450    pub version_hi: u32,
1451}
1452#[repr(C)]
1453#[derive(Copy, Clone)]
1454pub union ext4_inode__bindgen_ty_1 {
1455    pub linux2: ext4_inode__bindgen_ty_1__bindgen_ty_1,
1456    pub hurd2: ext4_inode__bindgen_ty_1__bindgen_ty_2,
1457}
1458#[repr(C, packed)]
1459#[derive(Debug, Copy, Clone)]
1460pub struct ext4_inode__bindgen_ty_1__bindgen_ty_1 {
1461    pub blocks_high: u16,
1462    pub file_acl_high: u16,
1463    pub uid_high: u16,
1464    pub gid_high: u16,
1465    pub checksum_lo: u16,
1466    pub reserved2: u16,
1467}
1468#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1469const _: () = {
1470    ["Size of ext4_inode__bindgen_ty_1__bindgen_ty_1"]
1471        [::std::mem::size_of::<ext4_inode__bindgen_ty_1__bindgen_ty_1>() - 12usize];
1472    ["Alignment of ext4_inode__bindgen_ty_1__bindgen_ty_1"]
1473        [::std::mem::align_of::<ext4_inode__bindgen_ty_1__bindgen_ty_1>() - 1usize];
1474    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::blocks_high"]
1475        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, blocks_high) - 0usize];
1476    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::file_acl_high"]
1477        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, file_acl_high) - 2usize];
1478    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::uid_high"]
1479        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, uid_high) - 4usize];
1480    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::gid_high"]
1481        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, gid_high) - 6usize];
1482    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::checksum_lo"]
1483        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, checksum_lo) - 8usize];
1484    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::reserved2"]
1485        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, reserved2) - 10usize];
1486};
1487#[repr(C, packed)]
1488#[derive(Debug, Copy, Clone)]
1489pub struct ext4_inode__bindgen_ty_1__bindgen_ty_2 {
1490    pub reserved1: u16,
1491    pub mode_high: u16,
1492    pub uid_high: u16,
1493    pub gid_high: u16,
1494    pub author: u32,
1495}
1496#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1497const _: () = {
1498    ["Size of ext4_inode__bindgen_ty_1__bindgen_ty_2"]
1499        [::std::mem::size_of::<ext4_inode__bindgen_ty_1__bindgen_ty_2>() - 12usize];
1500    ["Alignment of ext4_inode__bindgen_ty_1__bindgen_ty_2"]
1501        [::std::mem::align_of::<ext4_inode__bindgen_ty_1__bindgen_ty_2>() - 1usize];
1502    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::reserved1"]
1503        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, reserved1) - 0usize];
1504    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::mode_high"]
1505        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, mode_high) - 2usize];
1506    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::uid_high"]
1507        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, uid_high) - 4usize];
1508    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::gid_high"]
1509        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, gid_high) - 6usize];
1510    ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::author"]
1511        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, author) - 8usize];
1512};
1513#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1514const _: () = {
1515    ["Size of ext4_inode__bindgen_ty_1"]
1516        [::std::mem::size_of::<ext4_inode__bindgen_ty_1>() - 12usize];
1517    ["Alignment of ext4_inode__bindgen_ty_1"]
1518        [::std::mem::align_of::<ext4_inode__bindgen_ty_1>() - 1usize];
1519    ["Offset of field: ext4_inode__bindgen_ty_1::linux2"]
1520        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1, linux2) - 0usize];
1521    ["Offset of field: ext4_inode__bindgen_ty_1::hurd2"]
1522        [::std::mem::offset_of!(ext4_inode__bindgen_ty_1, hurd2) - 0usize];
1523};
1524#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1525const _: () = {
1526    ["Size of ext4_inode"][::std::mem::size_of::<ext4_inode>() - 156usize];
1527    ["Alignment of ext4_inode"][::std::mem::align_of::<ext4_inode>() - 1usize];
1528    ["Offset of field: ext4_inode::mode"][::std::mem::offset_of!(ext4_inode, mode) - 0usize];
1529    ["Offset of field: ext4_inode::uid"][::std::mem::offset_of!(ext4_inode, uid) - 2usize];
1530    ["Offset of field: ext4_inode::size_lo"][::std::mem::offset_of!(ext4_inode, size_lo) - 4usize];
1531    ["Offset of field: ext4_inode::access_time"]
1532        [::std::mem::offset_of!(ext4_inode, access_time) - 8usize];
1533    ["Offset of field: ext4_inode::change_inode_time"]
1534        [::std::mem::offset_of!(ext4_inode, change_inode_time) - 12usize];
1535    ["Offset of field: ext4_inode::modification_time"]
1536        [::std::mem::offset_of!(ext4_inode, modification_time) - 16usize];
1537    ["Offset of field: ext4_inode::deletion_time"]
1538        [::std::mem::offset_of!(ext4_inode, deletion_time) - 20usize];
1539    ["Offset of field: ext4_inode::gid"][::std::mem::offset_of!(ext4_inode, gid) - 24usize];
1540    ["Offset of field: ext4_inode::links_count"]
1541        [::std::mem::offset_of!(ext4_inode, links_count) - 26usize];
1542    ["Offset of field: ext4_inode::blocks_count_lo"]
1543        [::std::mem::offset_of!(ext4_inode, blocks_count_lo) - 28usize];
1544    ["Offset of field: ext4_inode::flags"][::std::mem::offset_of!(ext4_inode, flags) - 32usize];
1545    ["Offset of field: ext4_inode::unused_osd1"]
1546        [::std::mem::offset_of!(ext4_inode, unused_osd1) - 36usize];
1547    ["Offset of field: ext4_inode::blocks"][::std::mem::offset_of!(ext4_inode, blocks) - 40usize];
1548    ["Offset of field: ext4_inode::generation"]
1549        [::std::mem::offset_of!(ext4_inode, generation) - 100usize];
1550    ["Offset of field: ext4_inode::file_acl_lo"]
1551        [::std::mem::offset_of!(ext4_inode, file_acl_lo) - 104usize];
1552    ["Offset of field: ext4_inode::size_hi"]
1553        [::std::mem::offset_of!(ext4_inode, size_hi) - 108usize];
1554    ["Offset of field: ext4_inode::obso_faddr"]
1555        [::std::mem::offset_of!(ext4_inode, obso_faddr) - 112usize];
1556    ["Offset of field: ext4_inode::osd2"][::std::mem::offset_of!(ext4_inode, osd2) - 116usize];
1557    ["Offset of field: ext4_inode::extra_isize"]
1558        [::std::mem::offset_of!(ext4_inode, extra_isize) - 128usize];
1559    ["Offset of field: ext4_inode::checksum_hi"]
1560        [::std::mem::offset_of!(ext4_inode, checksum_hi) - 130usize];
1561    ["Offset of field: ext4_inode::ctime_extra"]
1562        [::std::mem::offset_of!(ext4_inode, ctime_extra) - 132usize];
1563    ["Offset of field: ext4_inode::mtime_extra"]
1564        [::std::mem::offset_of!(ext4_inode, mtime_extra) - 136usize];
1565    ["Offset of field: ext4_inode::atime_extra"]
1566        [::std::mem::offset_of!(ext4_inode, atime_extra) - 140usize];
1567    ["Offset of field: ext4_inode::crtime"][::std::mem::offset_of!(ext4_inode, crtime) - 144usize];
1568    ["Offset of field: ext4_inode::crtime_extra"]
1569        [::std::mem::offset_of!(ext4_inode, crtime_extra) - 148usize];
1570    ["Offset of field: ext4_inode::version_hi"]
1571        [::std::mem::offset_of!(ext4_inode, version_hi) - 152usize];
1572};
1573pub const EXT4_DE_UNKNOWN: _bindgen_ty_1 = 0;
1574pub const EXT4_DE_REG_FILE: _bindgen_ty_1 = 1;
1575pub const EXT4_DE_DIR: _bindgen_ty_1 = 2;
1576pub const EXT4_DE_CHRDEV: _bindgen_ty_1 = 3;
1577pub const EXT4_DE_BLKDEV: _bindgen_ty_1 = 4;
1578pub const EXT4_DE_FIFO: _bindgen_ty_1 = 5;
1579pub const EXT4_DE_SOCK: _bindgen_ty_1 = 6;
1580pub const EXT4_DE_SYMLINK: _bindgen_ty_1 = 7;
1581#[doc = "@brief   Directory entry types."]
1582pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1583#[repr(C)]
1584#[derive(Copy, Clone)]
1585pub union ext4_dir_en_internal {
1586    pub name_length_high: u8,
1587    pub inode_type: u8,
1588}
1589#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1590const _: () = {
1591    ["Size of ext4_dir_en_internal"][::std::mem::size_of::<ext4_dir_en_internal>() - 1usize];
1592    ["Alignment of ext4_dir_en_internal"][::std::mem::align_of::<ext4_dir_en_internal>() - 1usize];
1593    ["Offset of field: ext4_dir_en_internal::name_length_high"]
1594        [::std::mem::offset_of!(ext4_dir_en_internal, name_length_high) - 0usize];
1595    ["Offset of field: ext4_dir_en_internal::inode_type"]
1596        [::std::mem::offset_of!(ext4_dir_en_internal, inode_type) - 0usize];
1597};
1598#[doc = " Linked list directory entry structure"]
1599#[repr(C, packed)]
1600pub struct ext4_dir_en {
1601    pub inode: u32,
1602    pub entry_len: u16,
1603    pub name_len: u8,
1604    pub in_: ext4_dir_en_internal,
1605    pub name: __IncompleteArrayField<u8>,
1606}
1607#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1608const _: () = {
1609    ["Size of ext4_dir_en"][::std::mem::size_of::<ext4_dir_en>() - 8usize];
1610    ["Alignment of ext4_dir_en"][::std::mem::align_of::<ext4_dir_en>() - 1usize];
1611    ["Offset of field: ext4_dir_en::inode"][::std::mem::offset_of!(ext4_dir_en, inode) - 0usize];
1612    ["Offset of field: ext4_dir_en::entry_len"]
1613        [::std::mem::offset_of!(ext4_dir_en, entry_len) - 4usize];
1614    ["Offset of field: ext4_dir_en::name_len"]
1615        [::std::mem::offset_of!(ext4_dir_en, name_len) - 6usize];
1616    ["Offset of field: ext4_dir_en::in_"][::std::mem::offset_of!(ext4_dir_en, in_) - 7usize];
1617    ["Offset of field: ext4_dir_en::name"][::std::mem::offset_of!(ext4_dir_en, name) - 8usize];
1618};
1619#[repr(C, packed)]
1620#[derive(Debug, Copy, Clone)]
1621pub struct ext4_dir_idx_climit {
1622    pub limit: u16,
1623    pub count: u16,
1624}
1625#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1626const _: () = {
1627    ["Size of ext4_dir_idx_climit"][::std::mem::size_of::<ext4_dir_idx_climit>() - 4usize];
1628    ["Alignment of ext4_dir_idx_climit"][::std::mem::align_of::<ext4_dir_idx_climit>() - 1usize];
1629    ["Offset of field: ext4_dir_idx_climit::limit"]
1630        [::std::mem::offset_of!(ext4_dir_idx_climit, limit) - 0usize];
1631    ["Offset of field: ext4_dir_idx_climit::count"]
1632        [::std::mem::offset_of!(ext4_dir_idx_climit, count) - 2usize];
1633};
1634#[repr(C, packed)]
1635#[derive(Debug, Copy, Clone)]
1636pub struct ext4_dir_idx_dot_en {
1637    pub inode: u32,
1638    pub entry_length: u16,
1639    pub name_length: u8,
1640    pub inode_type: u8,
1641    pub name: [u8; 4usize],
1642}
1643#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1644const _: () = {
1645    ["Size of ext4_dir_idx_dot_en"][::std::mem::size_of::<ext4_dir_idx_dot_en>() - 12usize];
1646    ["Alignment of ext4_dir_idx_dot_en"][::std::mem::align_of::<ext4_dir_idx_dot_en>() - 1usize];
1647    ["Offset of field: ext4_dir_idx_dot_en::inode"]
1648        [::std::mem::offset_of!(ext4_dir_idx_dot_en, inode) - 0usize];
1649    ["Offset of field: ext4_dir_idx_dot_en::entry_length"]
1650        [::std::mem::offset_of!(ext4_dir_idx_dot_en, entry_length) - 4usize];
1651    ["Offset of field: ext4_dir_idx_dot_en::name_length"]
1652        [::std::mem::offset_of!(ext4_dir_idx_dot_en, name_length) - 6usize];
1653    ["Offset of field: ext4_dir_idx_dot_en::inode_type"]
1654        [::std::mem::offset_of!(ext4_dir_idx_dot_en, inode_type) - 7usize];
1655    ["Offset of field: ext4_dir_idx_dot_en::name"]
1656        [::std::mem::offset_of!(ext4_dir_idx_dot_en, name) - 8usize];
1657};
1658#[repr(C, packed)]
1659#[derive(Debug, Copy, Clone)]
1660pub struct ext4_dir_idx_rinfo {
1661    pub reserved_zero: u32,
1662    pub hash_version: u8,
1663    pub info_length: u8,
1664    pub indirect_levels: u8,
1665    pub unused_flags: u8,
1666}
1667#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1668const _: () = {
1669    ["Size of ext4_dir_idx_rinfo"][::std::mem::size_of::<ext4_dir_idx_rinfo>() - 8usize];
1670    ["Alignment of ext4_dir_idx_rinfo"][::std::mem::align_of::<ext4_dir_idx_rinfo>() - 1usize];
1671    ["Offset of field: ext4_dir_idx_rinfo::reserved_zero"]
1672        [::std::mem::offset_of!(ext4_dir_idx_rinfo, reserved_zero) - 0usize];
1673    ["Offset of field: ext4_dir_idx_rinfo::hash_version"]
1674        [::std::mem::offset_of!(ext4_dir_idx_rinfo, hash_version) - 4usize];
1675    ["Offset of field: ext4_dir_idx_rinfo::info_length"]
1676        [::std::mem::offset_of!(ext4_dir_idx_rinfo, info_length) - 5usize];
1677    ["Offset of field: ext4_dir_idx_rinfo::indirect_levels"]
1678        [::std::mem::offset_of!(ext4_dir_idx_rinfo, indirect_levels) - 6usize];
1679    ["Offset of field: ext4_dir_idx_rinfo::unused_flags"]
1680        [::std::mem::offset_of!(ext4_dir_idx_rinfo, unused_flags) - 7usize];
1681};
1682#[repr(C, packed)]
1683#[derive(Debug, Copy, Clone)]
1684pub struct ext4_dir_idx_entry {
1685    pub hash: u32,
1686    pub block: u32,
1687}
1688#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1689const _: () = {
1690    ["Size of ext4_dir_idx_entry"][::std::mem::size_of::<ext4_dir_idx_entry>() - 8usize];
1691    ["Alignment of ext4_dir_idx_entry"][::std::mem::align_of::<ext4_dir_idx_entry>() - 1usize];
1692    ["Offset of field: ext4_dir_idx_entry::hash"]
1693        [::std::mem::offset_of!(ext4_dir_idx_entry, hash) - 0usize];
1694    ["Offset of field: ext4_dir_idx_entry::block"]
1695        [::std::mem::offset_of!(ext4_dir_idx_entry, block) - 4usize];
1696};
1697#[repr(C)]
1698#[derive(Debug)]
1699pub struct ext4_dir_idx_root {
1700    pub dots: [ext4_dir_idx_dot_en; 2usize],
1701    pub info: ext4_dir_idx_rinfo,
1702    pub en: __IncompleteArrayField<ext4_dir_idx_entry>,
1703}
1704#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1705const _: () = {
1706    ["Size of ext4_dir_idx_root"][::std::mem::size_of::<ext4_dir_idx_root>() - 32usize];
1707    ["Alignment of ext4_dir_idx_root"][::std::mem::align_of::<ext4_dir_idx_root>() - 1usize];
1708    ["Offset of field: ext4_dir_idx_root::dots"]
1709        [::std::mem::offset_of!(ext4_dir_idx_root, dots) - 0usize];
1710    ["Offset of field: ext4_dir_idx_root::info"]
1711        [::std::mem::offset_of!(ext4_dir_idx_root, info) - 24usize];
1712    ["Offset of field: ext4_dir_idx_root::en"]
1713        [::std::mem::offset_of!(ext4_dir_idx_root, en) - 32usize];
1714};
1715#[repr(C, packed)]
1716#[derive(Debug, Copy, Clone)]
1717pub struct ext4_fake_dir_entry {
1718    pub inode: u32,
1719    pub entry_length: u16,
1720    pub name_length: u8,
1721    pub inode_type: u8,
1722}
1723#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1724const _: () = {
1725    ["Size of ext4_fake_dir_entry"][::std::mem::size_of::<ext4_fake_dir_entry>() - 8usize];
1726    ["Alignment of ext4_fake_dir_entry"][::std::mem::align_of::<ext4_fake_dir_entry>() - 1usize];
1727    ["Offset of field: ext4_fake_dir_entry::inode"]
1728        [::std::mem::offset_of!(ext4_fake_dir_entry, inode) - 0usize];
1729    ["Offset of field: ext4_fake_dir_entry::entry_length"]
1730        [::std::mem::offset_of!(ext4_fake_dir_entry, entry_length) - 4usize];
1731    ["Offset of field: ext4_fake_dir_entry::name_length"]
1732        [::std::mem::offset_of!(ext4_fake_dir_entry, name_length) - 6usize];
1733    ["Offset of field: ext4_fake_dir_entry::inode_type"]
1734        [::std::mem::offset_of!(ext4_fake_dir_entry, inode_type) - 7usize];
1735};
1736#[repr(C)]
1737#[derive(Debug)]
1738pub struct ext4_dir_idx_node {
1739    pub fake: ext4_fake_dir_entry,
1740    pub entries: __IncompleteArrayField<ext4_dir_idx_entry>,
1741}
1742#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1743const _: () = {
1744    ["Size of ext4_dir_idx_node"][::std::mem::size_of::<ext4_dir_idx_node>() - 8usize];
1745    ["Alignment of ext4_dir_idx_node"][::std::mem::align_of::<ext4_dir_idx_node>() - 1usize];
1746    ["Offset of field: ext4_dir_idx_node::fake"]
1747        [::std::mem::offset_of!(ext4_dir_idx_node, fake) - 0usize];
1748    ["Offset of field: ext4_dir_idx_node::entries"]
1749        [::std::mem::offset_of!(ext4_dir_idx_node, entries) - 8usize];
1750};
1751#[repr(C, packed)]
1752#[derive(Debug, Copy, Clone)]
1753pub struct ext4_dir_idx_tail {
1754    pub reserved: u32,
1755    pub checksum: u32,
1756}
1757#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1758const _: () = {
1759    ["Size of ext4_dir_idx_tail"][::std::mem::size_of::<ext4_dir_idx_tail>() - 8usize];
1760    ["Alignment of ext4_dir_idx_tail"][::std::mem::align_of::<ext4_dir_idx_tail>() - 1usize];
1761    ["Offset of field: ext4_dir_idx_tail::reserved"]
1762        [::std::mem::offset_of!(ext4_dir_idx_tail, reserved) - 0usize];
1763    ["Offset of field: ext4_dir_idx_tail::checksum"]
1764        [::std::mem::offset_of!(ext4_dir_idx_tail, checksum) - 4usize];
1765};
1766#[repr(C, packed)]
1767#[derive(Debug, Copy, Clone)]
1768pub struct ext4_dir_entry_tail {
1769    pub reserved_zero1: u32,
1770    pub rec_len: u16,
1771    pub reserved_zero2: u8,
1772    pub reserved_ft: u8,
1773    pub checksum: u32,
1774}
1775#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1776const _: () = {
1777    ["Size of ext4_dir_entry_tail"][::std::mem::size_of::<ext4_dir_entry_tail>() - 12usize];
1778    ["Alignment of ext4_dir_entry_tail"][::std::mem::align_of::<ext4_dir_entry_tail>() - 1usize];
1779    ["Offset of field: ext4_dir_entry_tail::reserved_zero1"]
1780        [::std::mem::offset_of!(ext4_dir_entry_tail, reserved_zero1) - 0usize];
1781    ["Offset of field: ext4_dir_entry_tail::rec_len"]
1782        [::std::mem::offset_of!(ext4_dir_entry_tail, rec_len) - 4usize];
1783    ["Offset of field: ext4_dir_entry_tail::reserved_zero2"]
1784        [::std::mem::offset_of!(ext4_dir_entry_tail, reserved_zero2) - 6usize];
1785    ["Offset of field: ext4_dir_entry_tail::reserved_ft"]
1786        [::std::mem::offset_of!(ext4_dir_entry_tail, reserved_ft) - 7usize];
1787    ["Offset of field: ext4_dir_entry_tail::checksum"]
1788        [::std::mem::offset_of!(ext4_dir_entry_tail, checksum) - 8usize];
1789};
1790#[repr(C, packed)]
1791#[derive(Debug, Copy, Clone)]
1792pub struct jbd_bhdr {
1793    pub magic: u32,
1794    pub blocktype: u32,
1795    pub sequence: u32,
1796}
1797#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1798const _: () = {
1799    ["Size of jbd_bhdr"][::std::mem::size_of::<jbd_bhdr>() - 12usize];
1800    ["Alignment of jbd_bhdr"][::std::mem::align_of::<jbd_bhdr>() - 1usize];
1801    ["Offset of field: jbd_bhdr::magic"][::std::mem::offset_of!(jbd_bhdr, magic) - 0usize];
1802    ["Offset of field: jbd_bhdr::blocktype"][::std::mem::offset_of!(jbd_bhdr, blocktype) - 4usize];
1803    ["Offset of field: jbd_bhdr::sequence"][::std::mem::offset_of!(jbd_bhdr, sequence) - 8usize];
1804};
1805#[repr(C, packed)]
1806#[derive(Debug, Copy, Clone)]
1807pub struct jbd_commit_header {
1808    pub header: jbd_bhdr,
1809    pub chksum_type: u8,
1810    pub chksum_size: u8,
1811    pub padding: [u8; 2usize],
1812    pub chksum: [u32; 8usize],
1813    pub commit_sec: u64,
1814    pub commit_nsec: u32,
1815}
1816#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1817const _: () = {
1818    ["Size of jbd_commit_header"][::std::mem::size_of::<jbd_commit_header>() - 60usize];
1819    ["Alignment of jbd_commit_header"][::std::mem::align_of::<jbd_commit_header>() - 1usize];
1820    ["Offset of field: jbd_commit_header::header"]
1821        [::std::mem::offset_of!(jbd_commit_header, header) - 0usize];
1822    ["Offset of field: jbd_commit_header::chksum_type"]
1823        [::std::mem::offset_of!(jbd_commit_header, chksum_type) - 12usize];
1824    ["Offset of field: jbd_commit_header::chksum_size"]
1825        [::std::mem::offset_of!(jbd_commit_header, chksum_size) - 13usize];
1826    ["Offset of field: jbd_commit_header::padding"]
1827        [::std::mem::offset_of!(jbd_commit_header, padding) - 14usize];
1828    ["Offset of field: jbd_commit_header::chksum"]
1829        [::std::mem::offset_of!(jbd_commit_header, chksum) - 16usize];
1830    ["Offset of field: jbd_commit_header::commit_sec"]
1831        [::std::mem::offset_of!(jbd_commit_header, commit_sec) - 48usize];
1832    ["Offset of field: jbd_commit_header::commit_nsec"]
1833        [::std::mem::offset_of!(jbd_commit_header, commit_nsec) - 56usize];
1834};
1835#[repr(C, packed)]
1836#[derive(Debug, Copy, Clone)]
1837pub struct jbd_block_tag3 {
1838    pub blocknr: u32,
1839    pub flags: u32,
1840    pub blocknr_high: u32,
1841    pub checksum: u32,
1842}
1843#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1844const _: () = {
1845    ["Size of jbd_block_tag3"][::std::mem::size_of::<jbd_block_tag3>() - 16usize];
1846    ["Alignment of jbd_block_tag3"][::std::mem::align_of::<jbd_block_tag3>() - 1usize];
1847    ["Offset of field: jbd_block_tag3::blocknr"]
1848        [::std::mem::offset_of!(jbd_block_tag3, blocknr) - 0usize];
1849    ["Offset of field: jbd_block_tag3::flags"]
1850        [::std::mem::offset_of!(jbd_block_tag3, flags) - 4usize];
1851    ["Offset of field: jbd_block_tag3::blocknr_high"]
1852        [::std::mem::offset_of!(jbd_block_tag3, blocknr_high) - 8usize];
1853    ["Offset of field: jbd_block_tag3::checksum"]
1854        [::std::mem::offset_of!(jbd_block_tag3, checksum) - 12usize];
1855};
1856#[repr(C, packed)]
1857#[derive(Debug, Copy, Clone)]
1858pub struct jbd_block_tag {
1859    pub blocknr: u32,
1860    pub checksum: u16,
1861    pub flags: u16,
1862    pub blocknr_high: u32,
1863}
1864#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1865const _: () = {
1866    ["Size of jbd_block_tag"][::std::mem::size_of::<jbd_block_tag>() - 12usize];
1867    ["Alignment of jbd_block_tag"][::std::mem::align_of::<jbd_block_tag>() - 1usize];
1868    ["Offset of field: jbd_block_tag::blocknr"]
1869        [::std::mem::offset_of!(jbd_block_tag, blocknr) - 0usize];
1870    ["Offset of field: jbd_block_tag::checksum"]
1871        [::std::mem::offset_of!(jbd_block_tag, checksum) - 4usize];
1872    ["Offset of field: jbd_block_tag::flags"]
1873        [::std::mem::offset_of!(jbd_block_tag, flags) - 6usize];
1874    ["Offset of field: jbd_block_tag::blocknr_high"]
1875        [::std::mem::offset_of!(jbd_block_tag, blocknr_high) - 8usize];
1876};
1877#[repr(C, packed)]
1878#[derive(Debug, Copy, Clone)]
1879pub struct jbd_block_tail {
1880    pub checksum: u32,
1881}
1882#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1883const _: () = {
1884    ["Size of jbd_block_tail"][::std::mem::size_of::<jbd_block_tail>() - 4usize];
1885    ["Alignment of jbd_block_tail"][::std::mem::align_of::<jbd_block_tail>() - 1usize];
1886    ["Offset of field: jbd_block_tail::checksum"]
1887        [::std::mem::offset_of!(jbd_block_tail, checksum) - 0usize];
1888};
1889#[repr(C, packed)]
1890#[derive(Debug, Copy, Clone)]
1891pub struct jbd_revoke_header {
1892    pub header: jbd_bhdr,
1893    pub count: u32,
1894}
1895#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1896const _: () = {
1897    ["Size of jbd_revoke_header"][::std::mem::size_of::<jbd_revoke_header>() - 16usize];
1898    ["Alignment of jbd_revoke_header"][::std::mem::align_of::<jbd_revoke_header>() - 1usize];
1899    ["Offset of field: jbd_revoke_header::header"]
1900        [::std::mem::offset_of!(jbd_revoke_header, header) - 0usize];
1901    ["Offset of field: jbd_revoke_header::count"]
1902        [::std::mem::offset_of!(jbd_revoke_header, count) - 12usize];
1903};
1904#[repr(C, packed)]
1905#[derive(Debug, Copy, Clone)]
1906pub struct jbd_revoke_tail {
1907    pub checksum: u32,
1908}
1909#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1910const _: () = {
1911    ["Size of jbd_revoke_tail"][::std::mem::size_of::<jbd_revoke_tail>() - 4usize];
1912    ["Alignment of jbd_revoke_tail"][::std::mem::align_of::<jbd_revoke_tail>() - 1usize];
1913    ["Offset of field: jbd_revoke_tail::checksum"]
1914        [::std::mem::offset_of!(jbd_revoke_tail, checksum) - 0usize];
1915};
1916#[repr(C, packed)]
1917#[derive(Debug, Copy, Clone)]
1918pub struct jbd_sb {
1919    pub header: jbd_bhdr,
1920    pub blocksize: u32,
1921    pub maxlen: u32,
1922    pub first: u32,
1923    pub sequence: u32,
1924    pub start: u32,
1925    pub error_val: i32,
1926    pub feature_compat: u32,
1927    pub feature_incompat: u32,
1928    pub feature_ro_compat: u32,
1929    pub uuid: [u8; 16usize],
1930    pub nr_users: u32,
1931    pub dynsuper: u32,
1932    pub max_transaction: u32,
1933    pub max_trandata: u32,
1934    pub checksum_type: u8,
1935    pub padding2: [u8; 3usize],
1936    pub padding: [u32; 42usize],
1937    pub checksum: u32,
1938    pub users: [u8; 768usize],
1939}
1940#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1941const _: () = {
1942    ["Size of jbd_sb"][::std::mem::size_of::<jbd_sb>() - 1024usize];
1943    ["Alignment of jbd_sb"][::std::mem::align_of::<jbd_sb>() - 1usize];
1944    ["Offset of field: jbd_sb::header"][::std::mem::offset_of!(jbd_sb, header) - 0usize];
1945    ["Offset of field: jbd_sb::blocksize"][::std::mem::offset_of!(jbd_sb, blocksize) - 12usize];
1946    ["Offset of field: jbd_sb::maxlen"][::std::mem::offset_of!(jbd_sb, maxlen) - 16usize];
1947    ["Offset of field: jbd_sb::first"][::std::mem::offset_of!(jbd_sb, first) - 20usize];
1948    ["Offset of field: jbd_sb::sequence"][::std::mem::offset_of!(jbd_sb, sequence) - 24usize];
1949    ["Offset of field: jbd_sb::start"][::std::mem::offset_of!(jbd_sb, start) - 28usize];
1950    ["Offset of field: jbd_sb::error_val"][::std::mem::offset_of!(jbd_sb, error_val) - 32usize];
1951    ["Offset of field: jbd_sb::feature_compat"]
1952        [::std::mem::offset_of!(jbd_sb, feature_compat) - 36usize];
1953    ["Offset of field: jbd_sb::feature_incompat"]
1954        [::std::mem::offset_of!(jbd_sb, feature_incompat) - 40usize];
1955    ["Offset of field: jbd_sb::feature_ro_compat"]
1956        [::std::mem::offset_of!(jbd_sb, feature_ro_compat) - 44usize];
1957    ["Offset of field: jbd_sb::uuid"][::std::mem::offset_of!(jbd_sb, uuid) - 48usize];
1958    ["Offset of field: jbd_sb::nr_users"][::std::mem::offset_of!(jbd_sb, nr_users) - 64usize];
1959    ["Offset of field: jbd_sb::dynsuper"][::std::mem::offset_of!(jbd_sb, dynsuper) - 68usize];
1960    ["Offset of field: jbd_sb::max_transaction"]
1961        [::std::mem::offset_of!(jbd_sb, max_transaction) - 72usize];
1962    ["Offset of field: jbd_sb::max_trandata"]
1963        [::std::mem::offset_of!(jbd_sb, max_trandata) - 76usize];
1964    ["Offset of field: jbd_sb::checksum_type"]
1965        [::std::mem::offset_of!(jbd_sb, checksum_type) - 80usize];
1966    ["Offset of field: jbd_sb::padding2"][::std::mem::offset_of!(jbd_sb, padding2) - 81usize];
1967    ["Offset of field: jbd_sb::padding"][::std::mem::offset_of!(jbd_sb, padding) - 84usize];
1968    ["Offset of field: jbd_sb::checksum"][::std::mem::offset_of!(jbd_sb, checksum) - 252usize];
1969    ["Offset of field: jbd_sb::users"][::std::mem::offset_of!(jbd_sb, users) - 256usize];
1970};
1971unsafe extern "C" {
1972    pub static mut __mlibc_errno: ::std::os::raw::c_int;
1973}
1974unsafe extern "C" {
1975    pub fn __errno_location() -> *mut ::std::os::raw::c_int;
1976}
1977unsafe extern "C" {
1978    pub static mut program_invocation_name: *mut ::std::os::raw::c_char;
1979}
1980unsafe extern "C" {
1981    pub static mut program_invocation_short_name: *mut ::std::os::raw::c_char;
1982}
1983unsafe extern "C" {
1984    pub static mut __progname: *mut ::std::os::raw::c_char;
1985}
1986unsafe extern "C" {
1987    pub static mut __progname_full: *mut ::std::os::raw::c_char;
1988}
1989#[repr(C)]
1990#[derive(Debug, Copy, Clone)]
1991pub struct imaxdiv_t {
1992    pub quot: intmax_t,
1993    pub rem: intmax_t,
1994}
1995#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1996const _: () = {
1997    ["Size of imaxdiv_t"][::std::mem::size_of::<imaxdiv_t>() - 16usize];
1998    ["Alignment of imaxdiv_t"][::std::mem::align_of::<imaxdiv_t>() - 8usize];
1999    ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize];
2000    ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize];
2001};
2002unsafe extern "C" {
2003    pub fn imaxabs(__x: intmax_t) -> intmax_t;
2004}
2005unsafe extern "C" {
2006    pub fn imaxdiv(__x: intmax_t, __y: intmax_t) -> imaxdiv_t;
2007}
2008unsafe extern "C" {
2009    pub fn strtoimax(
2010        __string: *const ::std::os::raw::c_char,
2011        __end: *mut *mut ::std::os::raw::c_char,
2012        __base: ::std::os::raw::c_int,
2013    ) -> intmax_t;
2014}
2015unsafe extern "C" {
2016    pub fn strtoumax(
2017        __string: *const ::std::os::raw::c_char,
2018        __end: *mut *mut ::std::os::raw::c_char,
2019        __base: ::std::os::raw::c_int,
2020    ) -> uintmax_t;
2021}
2022unsafe extern "C" {
2023    pub fn wcstoimax(
2024        __string: *const wchar_t,
2025        __end: *mut *mut wchar_t,
2026        __base: ::std::os::raw::c_int,
2027    ) -> intmax_t;
2028}
2029unsafe extern "C" {
2030    pub fn wcstoumax(
2031        __string: *const wchar_t,
2032        __end: *mut *mut wchar_t,
2033        __base: ::std::os::raw::c_int,
2034    ) -> uintmax_t;
2035}
2036unsafe extern "C" {
2037    #[doc = "@brief   Global mask debug set.\n @param   m new debug mask."]
2038    pub fn ext4_dmask_set(m: u32);
2039}
2040unsafe extern "C" {
2041    #[doc = "@brief   Global mask debug clear.\n @param   m new debug mask."]
2042    pub fn ext4_dmask_clr(m: u32);
2043}
2044unsafe extern "C" {
2045    #[doc = "@brief   Global debug mask get.\n @return  debug mask"]
2046    pub fn ext4_dmask_get() -> u32;
2047}
2048pub type FILE = __mlibc_file_base;
2049pub type off_t = ::std::os::raw::c_long;
2050pub type off64_t = ::std::os::raw::c_long;
2051#[repr(C)]
2052#[derive(Debug, Copy, Clone)]
2053pub struct __mlibc_file_base {
2054    pub __buffer_ptr: *mut ::std::os::raw::c_char,
2055    pub __buffer_size: usize,
2056    pub __offset: usize,
2057    pub __io_offset: usize,
2058    pub __valid_limit: usize,
2059    pub __dirty_begin: usize,
2060    pub __dirty_end: usize,
2061    pub __unget_ptr: *mut ::std::os::raw::c_char,
2062    pub __io_mode: ::std::os::raw::c_int,
2063    pub __status_bits: ::std::os::raw::c_int,
2064}
2065#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2066const _: () = {
2067    ["Size of __mlibc_file_base"][::std::mem::size_of::<__mlibc_file_base>() - 72usize];
2068    ["Alignment of __mlibc_file_base"][::std::mem::align_of::<__mlibc_file_base>() - 8usize];
2069    ["Offset of field: __mlibc_file_base::__buffer_ptr"]
2070        [::std::mem::offset_of!(__mlibc_file_base, __buffer_ptr) - 0usize];
2071    ["Offset of field: __mlibc_file_base::__buffer_size"]
2072        [::std::mem::offset_of!(__mlibc_file_base, __buffer_size) - 8usize];
2073    ["Offset of field: __mlibc_file_base::__offset"]
2074        [::std::mem::offset_of!(__mlibc_file_base, __offset) - 16usize];
2075    ["Offset of field: __mlibc_file_base::__io_offset"]
2076        [::std::mem::offset_of!(__mlibc_file_base, __io_offset) - 24usize];
2077    ["Offset of field: __mlibc_file_base::__valid_limit"]
2078        [::std::mem::offset_of!(__mlibc_file_base, __valid_limit) - 32usize];
2079    ["Offset of field: __mlibc_file_base::__dirty_begin"]
2080        [::std::mem::offset_of!(__mlibc_file_base, __dirty_begin) - 40usize];
2081    ["Offset of field: __mlibc_file_base::__dirty_end"]
2082        [::std::mem::offset_of!(__mlibc_file_base, __dirty_end) - 48usize];
2083    ["Offset of field: __mlibc_file_base::__unget_ptr"]
2084        [::std::mem::offset_of!(__mlibc_file_base, __unget_ptr) - 56usize];
2085    ["Offset of field: __mlibc_file_base::__io_mode"]
2086        [::std::mem::offset_of!(__mlibc_file_base, __io_mode) - 64usize];
2087    ["Offset of field: __mlibc_file_base::__status_bits"]
2088        [::std::mem::offset_of!(__mlibc_file_base, __status_bits) - 68usize];
2089};
2090pub type fpos_t = off_t;
2091unsafe extern "C" {
2092    pub static mut stderr: *mut FILE;
2093}
2094unsafe extern "C" {
2095    pub static mut stdin: *mut FILE;
2096}
2097unsafe extern "C" {
2098    pub static mut stdout: *mut FILE;
2099}
2100unsafe extern "C" {
2101    pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2102}
2103unsafe extern "C" {
2104    pub fn rename(
2105        __old_path: *const ::std::os::raw::c_char,
2106        __new_path: *const ::std::os::raw::c_char,
2107    ) -> ::std::os::raw::c_int;
2108}
2109unsafe extern "C" {
2110    pub fn renameat(
2111        __olddirfd: ::std::os::raw::c_int,
2112        __old_path: *const ::std::os::raw::c_char,
2113        __newdirfd: ::std::os::raw::c_int,
2114        __new_path: *const ::std::os::raw::c_char,
2115    ) -> ::std::os::raw::c_int;
2116}
2117unsafe extern "C" {
2118    pub fn tmpfile() -> *mut FILE;
2119}
2120unsafe extern "C" {
2121    pub fn tmpnam(__buffer: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2122}
2123unsafe extern "C" {
2124    pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
2125}
2126unsafe extern "C" {
2127    pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int;
2128}
2129unsafe extern "C" {
2130    pub fn fopen(
2131        __filename: *const ::std::os::raw::c_char,
2132        __mode: *const ::std::os::raw::c_char,
2133    ) -> *mut FILE;
2134}
2135unsafe extern "C" {
2136    pub fn freopen(
2137        __filename: *const ::std::os::raw::c_char,
2138        __mode: *const ::std::os::raw::c_char,
2139        __stream: *mut FILE,
2140    ) -> *mut FILE;
2141}
2142unsafe extern "C" {
2143    pub fn setbuf(__stream: *mut FILE, __buffer: *mut ::std::os::raw::c_char);
2144}
2145unsafe extern "C" {
2146    pub fn setvbuf(
2147        __stream: *mut FILE,
2148        __buffer: *mut ::std::os::raw::c_char,
2149        __mode: ::std::os::raw::c_int,
2150        __size: usize,
2151    ) -> ::std::os::raw::c_int;
2152}
2153unsafe extern "C" {
2154    pub fn setlinebuf(__stream: *mut FILE);
2155}
2156unsafe extern "C" {
2157    pub fn setbuffer(__stream: *mut FILE, __buffer: *mut ::std::os::raw::c_char, __size: usize);
2158}
2159unsafe extern "C" {
2160    pub fn fprintf(
2161        __stream: *mut FILE,
2162        __format: *const ::std::os::raw::c_char,
2163        ...
2164    ) -> ::std::os::raw::c_int;
2165}
2166unsafe extern "C" {
2167    pub fn fscanf(
2168        __stream: *mut FILE,
2169        __format: *const ::std::os::raw::c_char,
2170        ...
2171    ) -> ::std::os::raw::c_int;
2172}
2173unsafe extern "C" {
2174    pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
2175}
2176unsafe extern "C" {
2177    pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
2178}
2179unsafe extern "C" {
2180    pub fn snprintf(
2181        __buffer: *mut ::std::os::raw::c_char,
2182        __max_size: ::std::os::raw::c_ulong,
2183        __format: *const ::std::os::raw::c_char,
2184        ...
2185    ) -> ::std::os::raw::c_int;
2186}
2187unsafe extern "C" {
2188    pub fn sprintf(
2189        __buffer: *mut ::std::os::raw::c_char,
2190        __format: *const ::std::os::raw::c_char,
2191        ...
2192    ) -> ::std::os::raw::c_int;
2193}
2194unsafe extern "C" {
2195    pub fn sscanf(
2196        __buffer: *const ::std::os::raw::c_char,
2197        __format: *const ::std::os::raw::c_char,
2198        ...
2199    ) -> ::std::os::raw::c_int;
2200}
2201unsafe extern "C" {
2202    pub fn vfprintf(
2203        __stream: *mut FILE,
2204        __format: *const ::std::os::raw::c_char,
2205        __args: *mut __va_list_tag,
2206    ) -> ::std::os::raw::c_int;
2207}
2208unsafe extern "C" {
2209    pub fn vfscanf(
2210        __stream: *mut FILE,
2211        __format: *const ::std::os::raw::c_char,
2212        __args: *mut __va_list_tag,
2213    ) -> ::std::os::raw::c_int;
2214}
2215unsafe extern "C" {
2216    pub fn vprintf(
2217        __format: *const ::std::os::raw::c_char,
2218        __args: *mut __va_list_tag,
2219    ) -> ::std::os::raw::c_int;
2220}
2221unsafe extern "C" {
2222    pub fn vscanf(
2223        __format: *const ::std::os::raw::c_char,
2224        __args: *mut __va_list_tag,
2225    ) -> ::std::os::raw::c_int;
2226}
2227unsafe extern "C" {
2228    pub fn vsnprintf(
2229        __buffer: *mut ::std::os::raw::c_char,
2230        __max_size: ::std::os::raw::c_ulong,
2231        __format: *const ::std::os::raw::c_char,
2232        __args: *mut __va_list_tag,
2233    ) -> ::std::os::raw::c_int;
2234}
2235unsafe extern "C" {
2236    pub fn vsprintf(
2237        __buffer: *mut ::std::os::raw::c_char,
2238        __format: *const ::std::os::raw::c_char,
2239        __args: *mut __va_list_tag,
2240    ) -> ::std::os::raw::c_int;
2241}
2242unsafe extern "C" {
2243    pub fn vsscanf(
2244        __buffer: *const ::std::os::raw::c_char,
2245        __format: *const ::std::os::raw::c_char,
2246        __args: *mut __va_list_tag,
2247    ) -> ::std::os::raw::c_int;
2248}
2249unsafe extern "C" {
2250    pub fn vasprintf(
2251        __buffer: *mut *mut ::std::os::raw::c_char,
2252        __format: *const ::std::os::raw::c_char,
2253        __args: *mut __va_list_tag,
2254    ) -> ::std::os::raw::c_int;
2255}
2256unsafe extern "C" {
2257    pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int;
2258}
2259unsafe extern "C" {
2260    pub fn fgets(
2261        __buffer: *mut ::std::os::raw::c_char,
2262        __max_size: ::std::os::raw::c_int,
2263        __stream: *mut FILE,
2264    ) -> *mut ::std::os::raw::c_char;
2265}
2266unsafe extern "C" {
2267    pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2268}
2269unsafe extern "C" {
2270    pub fn fputs(
2271        __string: *const ::std::os::raw::c_char,
2272        __stream: *mut FILE,
2273    ) -> ::std::os::raw::c_int;
2274}
2275unsafe extern "C" {
2276    pub fn gets(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2277}
2278unsafe extern "C" {
2279    pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int;
2280}
2281unsafe extern "C" {
2282    pub fn getchar() -> ::std::os::raw::c_int;
2283}
2284unsafe extern "C" {
2285    pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2286}
2287unsafe extern "C" {
2288    pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
2289}
2290unsafe extern "C" {
2291    pub fn puts(__string: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2292}
2293unsafe extern "C" {
2294    pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2295}
2296unsafe extern "C" {
2297    pub fn fread(
2298        __buffer: *mut ::std::os::raw::c_void,
2299        __size: ::std::os::raw::c_ulong,
2300        __count: ::std::os::raw::c_ulong,
2301        __stream: *mut FILE,
2302    ) -> ::std::os::raw::c_ulong;
2303}
2304unsafe extern "C" {
2305    pub fn fwrite(
2306        __buffer: *const ::std::os::raw::c_void,
2307        __size: ::std::os::raw::c_ulong,
2308        __count: ::std::os::raw::c_ulong,
2309        __stream: *mut FILE,
2310    ) -> ::std::os::raw::c_ulong;
2311}
2312unsafe extern "C" {
2313    pub fn fgetpos(__stream: *mut FILE, __position: *mut fpos_t) -> ::std::os::raw::c_int;
2314}
2315unsafe extern "C" {
2316    pub fn fseek(
2317        __stream: *mut FILE,
2318        __offset: ::std::os::raw::c_long,
2319        __whence: ::std::os::raw::c_int,
2320    ) -> ::std::os::raw::c_int;
2321}
2322unsafe extern "C" {
2323    pub fn fsetpos(__stream: *mut FILE, __position: *const fpos_t) -> ::std::os::raw::c_int;
2324}
2325unsafe extern "C" {
2326    pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long;
2327}
2328unsafe extern "C" {
2329    pub fn rewind(__stream: *mut FILE);
2330}
2331unsafe extern "C" {
2332    pub fn clearerr(__stream: *mut FILE);
2333}
2334unsafe extern "C" {
2335    pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int;
2336}
2337unsafe extern "C" {
2338    pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int;
2339}
2340unsafe extern "C" {
2341    pub fn perror(__string: *const ::std::os::raw::c_char);
2342}
2343unsafe extern "C" {
2344    pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2345}
2346unsafe extern "C" {
2347    pub fn getchar_unlocked() -> ::std::os::raw::c_int;
2348}
2349unsafe extern "C" {
2350    pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2351}
2352unsafe extern "C" {
2353    pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
2354}
2355unsafe extern "C" {
2356    pub fn getline(
2357        __linep: *mut *mut ::std::os::raw::c_char,
2358        __sizep: *mut usize,
2359        __stream: *mut FILE,
2360    ) -> isize;
2361}
2362unsafe extern "C" {
2363    pub fn getdelim(
2364        __linep: *mut *mut ::std::os::raw::c_char,
2365        __sizep: *mut usize,
2366        __delim: ::std::os::raw::c_int,
2367        __stream: *mut FILE,
2368    ) -> isize;
2369}
2370unsafe extern "C" {
2371    pub fn asprintf(
2372        __buffer: *mut *mut ::std::os::raw::c_char,
2373        __format: *const ::std::os::raw::c_char,
2374        ...
2375    ) -> ::std::os::raw::c_int;
2376}
2377unsafe extern "C" {
2378    pub fn flockfile(__stream: *mut FILE);
2379}
2380unsafe extern "C" {
2381    pub fn funlockfile(__stream: *mut FILE);
2382}
2383unsafe extern "C" {
2384    pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int;
2385}
2386unsafe extern "C" {
2387    pub fn clearerr_unlocked(__stream: *mut FILE);
2388}
2389unsafe extern "C" {
2390    pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2391}
2392unsafe extern "C" {
2393    pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2394}
2395unsafe extern "C" {
2396    pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2397}
2398unsafe extern "C" {
2399    pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2400}
2401unsafe extern "C" {
2402    pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2403}
2404unsafe extern "C" {
2405    pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE)
2406        -> ::std::os::raw::c_int;
2407}
2408unsafe extern "C" {
2409    pub fn fread_unlocked(
2410        __buffer: *mut ::std::os::raw::c_void,
2411        __size: usize,
2412        __count: usize,
2413        __stream: *mut FILE,
2414    ) -> usize;
2415}
2416unsafe extern "C" {
2417    pub fn fwrite_unlocked(
2418        __buffer: *const ::std::os::raw::c_void,
2419        __size: usize,
2420        __count: usize,
2421        __stream: *mut FILE,
2422    ) -> usize;
2423}
2424unsafe extern "C" {
2425    pub fn fgets_unlocked(
2426        __buffer: *mut ::std::os::raw::c_char,
2427        __size: ::std::os::raw::c_int,
2428        __stream: *mut FILE,
2429    ) -> *mut ::std::os::raw::c_char;
2430}
2431unsafe extern "C" {
2432    pub fn fputs_unlocked(
2433        __buffer: *const ::std::os::raw::c_char,
2434        __stream: *mut FILE,
2435    ) -> ::std::os::raw::c_int;
2436}
2437unsafe extern "C" {
2438    pub fn fileno(__file: *mut FILE) -> ::std::os::raw::c_int;
2439}
2440unsafe extern "C" {
2441    pub fn fdopen(__fd: ::std::os::raw::c_int, __mode: *const ::std::os::raw::c_char) -> *mut FILE;
2442}
2443unsafe extern "C" {
2444    pub fn fmemopen(
2445        __buf: *mut ::std::os::raw::c_void,
2446        __size: usize,
2447        __mode: *const ::std::os::raw::c_char,
2448    ) -> *mut FILE;
2449}
2450unsafe extern "C" {
2451    pub fn pclose(__file: *mut FILE) -> ::std::os::raw::c_int;
2452}
2453unsafe extern "C" {
2454    pub fn popen(
2455        __command: *const ::std::os::raw::c_char,
2456        __type: *const ::std::os::raw::c_char,
2457    ) -> *mut FILE;
2458}
2459unsafe extern "C" {
2460    pub fn open_memstream(
2461        __buf: *mut *mut ::std::os::raw::c_char,
2462        __sizeloc: *mut usize,
2463    ) -> *mut FILE;
2464}
2465unsafe extern "C" {
2466    pub fn fseeko(
2467        __stream: *mut FILE,
2468        __offset: off_t,
2469        __whence: ::std::os::raw::c_int,
2470    ) -> ::std::os::raw::c_int;
2471}
2472unsafe extern "C" {
2473    pub fn fseeko64(
2474        __stream: *mut FILE,
2475        __offset: off64_t,
2476        __whence: ::std::os::raw::c_int,
2477    ) -> ::std::os::raw::c_int;
2478}
2479unsafe extern "C" {
2480    pub fn ftello(__stream: *mut FILE) -> off_t;
2481}
2482unsafe extern "C" {
2483    pub fn ftello64(__stream: *mut FILE) -> off64_t;
2484}
2485unsafe extern "C" {
2486    pub fn dprintf(
2487        __fd: ::std::os::raw::c_int,
2488        __format: *const ::std::os::raw::c_char,
2489        ...
2490    ) -> ::std::os::raw::c_int;
2491}
2492unsafe extern "C" {
2493    pub fn vdprintf(
2494        __fd: ::std::os::raw::c_int,
2495        __format: *const ::std::os::raw::c_char,
2496        __args: *mut __va_list_tag,
2497    ) -> ::std::os::raw::c_int;
2498}
2499unsafe extern "C" {
2500    pub fn fgetln(__stream: *mut FILE, __size: *mut usize) -> *mut ::std::os::raw::c_char;
2501}
2502unsafe extern "C" {
2503    pub fn tempnam(
2504        __dir: *const ::std::os::raw::c_char,
2505        __pfx: *const ::std::os::raw::c_char,
2506    ) -> *mut ::std::os::raw::c_char;
2507}
2508pub type cookie_read_function_t = ::std::option::Option<
2509    unsafe extern "C" fn(
2510        __cookie: *mut ::std::os::raw::c_void,
2511        __buffer: *mut ::std::os::raw::c_char,
2512        __size: usize,
2513    ) -> isize,
2514>;
2515pub type cookie_write_function_t = ::std::option::Option<
2516    unsafe extern "C" fn(
2517        __cookie: *mut ::std::os::raw::c_void,
2518        __buffer: *const ::std::os::raw::c_char,
2519        __size: usize,
2520    ) -> isize,
2521>;
2522pub type cookie_seek_function_t = ::std::option::Option<
2523    unsafe extern "C" fn(
2524        __cookie: *mut ::std::os::raw::c_void,
2525        arg1: *mut off_t,
2526        arg2: ::std::os::raw::c_int,
2527    ) -> ::std::os::raw::c_int,
2528>;
2529pub type cookie_close_function_t = ::std::option::Option<
2530    unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
2531>;
2532#[repr(C)]
2533#[derive(Debug, Copy, Clone)]
2534pub struct _IO_cookie_io_functions_t {
2535    pub read: cookie_read_function_t,
2536    pub write: cookie_write_function_t,
2537    pub seek: cookie_seek_function_t,
2538    pub close: cookie_close_function_t,
2539}
2540#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2541const _: () = {
2542    ["Size of _IO_cookie_io_functions_t"]
2543        [::std::mem::size_of::<_IO_cookie_io_functions_t>() - 32usize];
2544    ["Alignment of _IO_cookie_io_functions_t"]
2545        [::std::mem::align_of::<_IO_cookie_io_functions_t>() - 8usize];
2546    ["Offset of field: _IO_cookie_io_functions_t::read"]
2547        [::std::mem::offset_of!(_IO_cookie_io_functions_t, read) - 0usize];
2548    ["Offset of field: _IO_cookie_io_functions_t::write"]
2549        [::std::mem::offset_of!(_IO_cookie_io_functions_t, write) - 8usize];
2550    ["Offset of field: _IO_cookie_io_functions_t::seek"]
2551        [::std::mem::offset_of!(_IO_cookie_io_functions_t, seek) - 16usize];
2552    ["Offset of field: _IO_cookie_io_functions_t::close"]
2553        [::std::mem::offset_of!(_IO_cookie_io_functions_t, close) - 24usize];
2554};
2555pub type cookie_io_functions_t = _IO_cookie_io_functions_t;
2556#[doc = "@brief   OS dependent lock interface."]
2557#[repr(C)]
2558#[derive(Debug, Copy, Clone)]
2559pub struct ext4_lock {
2560    #[doc = "@brief   Lock access to mount point."]
2561    pub lock: ::std::option::Option<unsafe extern "C" fn()>,
2562    #[doc = "@brief   Unlock access to mount point."]
2563    pub unlock: ::std::option::Option<unsafe extern "C" fn()>,
2564}
2565#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2566const _: () = {
2567    ["Size of ext4_lock"][::std::mem::size_of::<ext4_lock>() - 16usize];
2568    ["Alignment of ext4_lock"][::std::mem::align_of::<ext4_lock>() - 8usize];
2569    ["Offset of field: ext4_lock::lock"][::std::mem::offset_of!(ext4_lock, lock) - 0usize];
2570    ["Offset of field: ext4_lock::unlock"][::std::mem::offset_of!(ext4_lock, unlock) - 8usize];
2571};
2572#[doc = "@brief   File descriptor."]
2573#[repr(C)]
2574#[derive(Debug, Copy, Clone)]
2575pub struct ext4_file {
2576    #[doc = "@brief   Mount point handle."]
2577    pub mp: *mut ext4_mountpoint,
2578    #[doc = "@brief   File inode id."]
2579    pub inode: u32,
2580    #[doc = "@brief   Open flags."]
2581    pub flags: u32,
2582    #[doc = "@brief   File size."]
2583    pub fsize: u64,
2584    #[doc = "@brief   Actual file position."]
2585    pub fpos: u64,
2586}
2587#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2588const _: () = {
2589    ["Size of ext4_file"][::std::mem::size_of::<ext4_file>() - 32usize];
2590    ["Alignment of ext4_file"][::std::mem::align_of::<ext4_file>() - 8usize];
2591    ["Offset of field: ext4_file::mp"][::std::mem::offset_of!(ext4_file, mp) - 0usize];
2592    ["Offset of field: ext4_file::inode"][::std::mem::offset_of!(ext4_file, inode) - 8usize];
2593    ["Offset of field: ext4_file::flags"][::std::mem::offset_of!(ext4_file, flags) - 12usize];
2594    ["Offset of field: ext4_file::fsize"][::std::mem::offset_of!(ext4_file, fsize) - 16usize];
2595    ["Offset of field: ext4_file::fpos"][::std::mem::offset_of!(ext4_file, fpos) - 24usize];
2596};
2597#[doc = "@brief   Directory entry descriptor."]
2598#[repr(C)]
2599#[derive(Debug, Copy, Clone)]
2600pub struct ext4_direntry {
2601    pub inode: u32,
2602    pub entry_length: u16,
2603    pub name_length: u8,
2604    pub inode_type: u8,
2605    pub name: [u8; 255usize],
2606}
2607#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2608const _: () = {
2609    ["Size of ext4_direntry"][::std::mem::size_of::<ext4_direntry>() - 264usize];
2610    ["Alignment of ext4_direntry"][::std::mem::align_of::<ext4_direntry>() - 4usize];
2611    ["Offset of field: ext4_direntry::inode"]
2612        [::std::mem::offset_of!(ext4_direntry, inode) - 0usize];
2613    ["Offset of field: ext4_direntry::entry_length"]
2614        [::std::mem::offset_of!(ext4_direntry, entry_length) - 4usize];
2615    ["Offset of field: ext4_direntry::name_length"]
2616        [::std::mem::offset_of!(ext4_direntry, name_length) - 6usize];
2617    ["Offset of field: ext4_direntry::inode_type"]
2618        [::std::mem::offset_of!(ext4_direntry, inode_type) - 7usize];
2619    ["Offset of field: ext4_direntry::name"][::std::mem::offset_of!(ext4_direntry, name) - 8usize];
2620};
2621#[doc = "@brief   Directory descriptor."]
2622#[repr(C)]
2623#[derive(Debug, Copy, Clone)]
2624pub struct ext4_dir {
2625    #[doc = "@brief   File descriptor."]
2626    pub f: ext4_file,
2627    #[doc = "@brief   Current directory entry."]
2628    pub de: ext4_direntry,
2629    #[doc = "@brief   Next entry offset."]
2630    pub next_off: u64,
2631}
2632#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2633const _: () = {
2634    ["Size of ext4_dir"][::std::mem::size_of::<ext4_dir>() - 304usize];
2635    ["Alignment of ext4_dir"][::std::mem::align_of::<ext4_dir>() - 8usize];
2636    ["Offset of field: ext4_dir::f"][::std::mem::offset_of!(ext4_dir, f) - 0usize];
2637    ["Offset of field: ext4_dir::de"][::std::mem::offset_of!(ext4_dir, de) - 32usize];
2638    ["Offset of field: ext4_dir::next_off"][::std::mem::offset_of!(ext4_dir, next_off) - 296usize];
2639};
2640unsafe extern "C" {
2641    #[doc = "@brief   Register block device.\n\n @param   bd Block device.\n @param   dev_name Block device name.\n\n @return  Standard error code."]
2642    pub fn ext4_device_register(
2643        bd: *mut ext4_blockdev,
2644        dev_name: *const ::std::os::raw::c_char,
2645    ) -> ::std::os::raw::c_int;
2646}
2647unsafe extern "C" {
2648    #[doc = "@brief   Un-register block device.\n\n @param   dev_name Block device name.\n\n @return  Standard error code."]
2649    pub fn ext4_device_unregister(dev_name: *const ::std::os::raw::c_char)
2650        -> ::std::os::raw::c_int;
2651}
2652unsafe extern "C" {
2653    #[doc = "@brief   Un-register all block devices.\n\n @return  Standard error code."]
2654    pub fn ext4_device_unregister_all() -> ::std::os::raw::c_int;
2655}
2656unsafe extern "C" {
2657    #[doc = "@brief   Mount a block device with EXT4 partition to the mount point.\n\n @param   dev_name Block device name (@ref ext4_device_register).\n @param   mount_point Mount point, for example:\n          -   /\n          -   /my_partition/\n          -   /my_second_partition/\n @param   read_only mount as read-only mode.\n\n @return Standard error code"]
2658    pub fn ext4_mount(
2659        dev_name: *const ::std::os::raw::c_char,
2660        mount_point: *const ::std::os::raw::c_char,
2661        read_only: bool,
2662    ) -> ::std::os::raw::c_int;
2663}
2664unsafe extern "C" {
2665    #[doc = "@brief   Umount operation.\n\n @param   mount_point Mount point.\n\n @return  Standard error code"]
2666    pub fn ext4_umount(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2667}
2668#[repr(C)]
2669#[derive(Debug, Copy, Clone)]
2670pub struct ext4_mountpoint {
2671    _unused: [u8; 0],
2672}
2673unsafe extern "C" {
2674    pub fn ext4_get_mount(path: *const ::std::os::raw::c_char) -> *mut ext4_mountpoint;
2675}
2676unsafe extern "C" {
2677    #[doc = "@brief   Starts journaling. Journaling start/stop functions are transparent\n          and might be used on filesystems without journaling support.\n @warning Usage:\n              ext4_mount(\"sda1\", \"/\");\n              ext4_journal_start(\"/\");\n\n              //File operations here...\n\n              ext4_journal_stop(\"/\");\n              ext4_umount(\"/\");\n @param   mount_point Mount point.\n\n @return  Standard error code."]
2678    pub fn ext4_journal_start(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2679}
2680unsafe extern "C" {
2681    #[doc = "@brief   Stops journaling. Journaling start/stop functions are transparent\n          and might be used on filesystems without journaling support.\n\n @param   mount_point Mount point name.\n\n @return  Standard error code."]
2682    pub fn ext4_journal_stop(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2683}
2684unsafe extern "C" {
2685    #[doc = "@brief   Journal recovery.\n @warning Must be called after @ref ext4_mount.\n\n @param   mount_point Mount point.\n\n @return Standard error code."]
2686    pub fn ext4_recover(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2687}
2688#[doc = "@brief   Some of the filesystem stats."]
2689#[repr(C)]
2690#[derive(Debug, Copy, Clone)]
2691pub struct ext4_mount_stats {
2692    pub inodes_count: u32,
2693    pub free_inodes_count: u32,
2694    pub blocks_count: u64,
2695    pub free_blocks_count: u64,
2696    pub block_size: u32,
2697    pub block_group_count: u32,
2698    pub blocks_per_group: u32,
2699    pub inodes_per_group: u32,
2700    pub volume_name: [::std::os::raw::c_char; 16usize],
2701}
2702#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2703const _: () = {
2704    ["Size of ext4_mount_stats"][::std::mem::size_of::<ext4_mount_stats>() - 56usize];
2705    ["Alignment of ext4_mount_stats"][::std::mem::align_of::<ext4_mount_stats>() - 8usize];
2706    ["Offset of field: ext4_mount_stats::inodes_count"]
2707        [::std::mem::offset_of!(ext4_mount_stats, inodes_count) - 0usize];
2708    ["Offset of field: ext4_mount_stats::free_inodes_count"]
2709        [::std::mem::offset_of!(ext4_mount_stats, free_inodes_count) - 4usize];
2710    ["Offset of field: ext4_mount_stats::blocks_count"]
2711        [::std::mem::offset_of!(ext4_mount_stats, blocks_count) - 8usize];
2712    ["Offset of field: ext4_mount_stats::free_blocks_count"]
2713        [::std::mem::offset_of!(ext4_mount_stats, free_blocks_count) - 16usize];
2714    ["Offset of field: ext4_mount_stats::block_size"]
2715        [::std::mem::offset_of!(ext4_mount_stats, block_size) - 24usize];
2716    ["Offset of field: ext4_mount_stats::block_group_count"]
2717        [::std::mem::offset_of!(ext4_mount_stats, block_group_count) - 28usize];
2718    ["Offset of field: ext4_mount_stats::blocks_per_group"]
2719        [::std::mem::offset_of!(ext4_mount_stats, blocks_per_group) - 32usize];
2720    ["Offset of field: ext4_mount_stats::inodes_per_group"]
2721        [::std::mem::offset_of!(ext4_mount_stats, inodes_per_group) - 36usize];
2722    ["Offset of field: ext4_mount_stats::volume_name"]
2723        [::std::mem::offset_of!(ext4_mount_stats, volume_name) - 40usize];
2724};
2725unsafe extern "C" {
2726    #[doc = "@brief   Get file mount point stats.\n\n @param   mount_point Mount point.\n @param   stats Filesystem stats.\n\n @return Standard error code."]
2727    pub fn ext4_mount_point_stats(
2728        mount_point: *const ::std::os::raw::c_char,
2729        stats: *mut ext4_mount_stats,
2730    ) -> ::std::os::raw::c_int;
2731}
2732unsafe extern "C" {
2733    #[doc = "@brief   Setup OS lock routines.\n\n @param   mount_point Mount point.\n @param   locks  Lock and unlock functions\n\n @return Standard error code."]
2734    pub fn ext4_mount_setup_locks(
2735        mount_point: *const ::std::os::raw::c_char,
2736        locks: *const ext4_lock,
2737    ) -> ::std::os::raw::c_int;
2738}
2739unsafe extern "C" {
2740    #[doc = "@brief   Acquire the filesystem superblock pointer of a mp.\n\n @param   mount_point Mount point.\n @param   sb Superblock handle\n\n @return Standard error code."]
2741    pub fn ext4_get_sblock(
2742        mount_point: *const ::std::os::raw::c_char,
2743        sb: *mut *mut ext4_sblock,
2744    ) -> ::std::os::raw::c_int;
2745}
2746unsafe extern "C" {
2747    #[doc = "@brief   Enable/disable write back cache mode.\n @warning Default model of cache is write trough. It means that when You do:\n\n          ext4_fopen(...);\n          ext4_fwrite(...);\n                           < --- data is flushed to physical drive\n\n          When you do:\n          ext4_cache_write_back(..., 1);\n          ext4_fopen(...);\n          ext4_fwrite(...);\n                           < --- data is NOT flushed to physical drive\n          ext4_cache_write_back(..., 0);\n                           < --- when write back mode is disabled all\n                                 cache data will be flushed\n To enable write back mode permanently just call this function\n once after ext4_mount (and disable before ext4_umount).\n\n Some of the function use write back cache mode internally.\n If you enable write back mode twice you have to disable it twice\n to flush all data:\n\n      ext4_cache_write_back(..., 1);\n      ext4_cache_write_back(..., 1);\n\n      ext4_cache_write_back(..., 0);\n      ext4_cache_write_back(..., 0);\n\n Write back mode is useful when you want to create a lot of empty\n files/directories.\n\n @param   path Mount point.\n @param   on Enable/disable cache writeback mode.\n\n @return Standard error code."]
2748    pub fn ext4_cache_write_back(
2749        path: *const ::std::os::raw::c_char,
2750        on: bool,
2751    ) -> ::std::os::raw::c_int;
2752}
2753unsafe extern "C" {
2754    #[doc = "@brief   Force cache flush.\n\n @param   path Mount point.\n\n @return  Standard error code."]
2755    pub fn ext4_cache_flush(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2756}
2757unsafe extern "C" {
2758    #[doc = "@brief   Remove file by path.\n\n @param   path Path to file.\n\n @return  Standard error code."]
2759    pub fn ext4_fremove(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2760}
2761unsafe extern "C" {
2762    #[doc = "@brief   Create a hardlink for a file.\n\n @param   path Path to file.\n @param   hardlink_path Path of hardlink.\n\n @return  Standard error code."]
2763    pub fn ext4_flink(
2764        path: *const ::std::os::raw::c_char,
2765        hardlink_path: *const ::std::os::raw::c_char,
2766    ) -> ::std::os::raw::c_int;
2767}
2768unsafe extern "C" {
2769    #[doc = "@brief Rename file.\n @param path Source.\n @param new_path Destination.\n @return  Standard error code."]
2770    pub fn ext4_frename(
2771        path: *const ::std::os::raw::c_char,
2772        new_path: *const ::std::os::raw::c_char,
2773    ) -> ::std::os::raw::c_int;
2774}
2775unsafe extern "C" {
2776    #[doc = "@brief   File open function.\n\n @param   file  File handle.\n @param   path  File path, has to start from mount point:/my_partition/file.\n @param   flags File open flags.\n  |---------------------------------------------------------------|\n  |   r or rb                 O_RDONLY                            |\n  |---------------------------------------------------------------|\n  |   w or wb                 O_WRONLY|O_CREAT|O_TRUNC            |\n  |---------------------------------------------------------------|\n  |   a or ab                 O_WRONLY|O_CREAT|O_APPEND           |\n  |---------------------------------------------------------------|\n  |   r+ or rb+ or r+b        O_RDWR                              |\n  |---------------------------------------------------------------|\n  |   w+ or wb+ or w+b        O_RDWR|O_CREAT|O_TRUNC              |\n  |---------------------------------------------------------------|\n  |   a+ or ab+ or a+b        O_RDWR|O_CREAT|O_APPEND             |\n  |---------------------------------------------------------------|\n\n @return  Standard error code."]
2777    pub fn ext4_fopen(
2778        file: *mut ext4_file,
2779        path: *const ::std::os::raw::c_char,
2780        flags: *const ::std::os::raw::c_char,
2781    ) -> ::std::os::raw::c_int;
2782}
2783unsafe extern "C" {
2784    #[doc = "@brief   Alternate file open function.\n\n @param   file  File handle.\n @param   path  File path, has to start from mount point:/my_partition/file.\n @param   flags File open flags.\n\n @return  Standard error code."]
2785    pub fn ext4_fopen2(
2786        file: *mut ext4_file,
2787        path: *const ::std::os::raw::c_char,
2788        flags: ::std::os::raw::c_int,
2789    ) -> ::std::os::raw::c_int;
2790}
2791unsafe extern "C" {
2792    #[doc = "@brief   File close function.\n\n @param   file File handle.\n\n @return  Standard error code."]
2793    pub fn ext4_fclose(file: *mut ext4_file) -> ::std::os::raw::c_int;
2794}
2795unsafe extern "C" {
2796    #[doc = "@brief   File truncate function.\n\n @param   file File handle.\n @param   size New file size.\n\n @return  Standard error code."]
2797    pub fn ext4_ftruncate(file: *mut ext4_file, size: u64) -> ::std::os::raw::c_int;
2798}
2799unsafe extern "C" {
2800    #[doc = "@brief   Read data from file.\n\n @param   file File handle.\n @param   buf  Output buffer.\n @param   size Bytes to read.\n @param   rcnt Bytes read (NULL allowed).\n\n @return  Standard error code."]
2801    pub fn ext4_fread(
2802        file: *mut ext4_file,
2803        buf: *mut ::std::os::raw::c_void,
2804        size: usize,
2805        rcnt: *mut usize,
2806    ) -> ::std::os::raw::c_int;
2807}
2808unsafe extern "C" {
2809    #[doc = "@brief   Write data to file.\n\n @param   file File handle.\n @param   buf  Data to write\n @param   size Write length..\n @param   wcnt Bytes written (NULL allowed).\n\n @return  Standard error code."]
2810    pub fn ext4_fwrite(
2811        file: *mut ext4_file,
2812        buf: *const ::std::os::raw::c_void,
2813        size: usize,
2814        wcnt: *mut usize,
2815    ) -> ::std::os::raw::c_int;
2816}
2817unsafe extern "C" {
2818    #[doc = "@brief   File seek operation.\n\n @param   file File handle.\n @param   offset Offset to seek.\n @param   origin Seek type:\n              @ref SEEK_SET\n              @ref SEEK_CUR\n              @ref SEEK_END\n\n @return  Standard error code."]
2819    pub fn ext4_fseek(file: *mut ext4_file, offset: i64, origin: u32) -> ::std::os::raw::c_int;
2820}
2821unsafe extern "C" {
2822    #[doc = "@brief   Get file position.\n\n @param   file File handle.\n\n @return  Actual file position"]
2823    pub fn ext4_ftell(file: *mut ext4_file) -> u64;
2824}
2825unsafe extern "C" {
2826    #[doc = "@brief   Get file size.\n\n @param   file File handle.\n\n @return  File size."]
2827    pub fn ext4_fsize(file: *mut ext4_file) -> u64;
2828}
2829unsafe extern "C" {
2830    #[doc = "@brief Get inode of file/directory/link.\n\n @param path    Parh to file/dir/link.\n @param ret_ino Inode number.\n @param inode   Inode internals.\n\n @return  Standard error code."]
2831    pub fn ext4_raw_inode_fill(
2832        path: *const ::std::os::raw::c_char,
2833        ret_ino: *mut u32,
2834        inode: *mut ext4_inode,
2835    ) -> ::std::os::raw::c_int;
2836}
2837unsafe extern "C" {
2838    #[doc = "@brief Check if inode exists.\n\n @param path    Parh to file/dir/link.\n @param type    Inode type.\n                @ref EXT4_DIRENTRY_UNKNOWN\n                @ref EXT4_DE_REG_FILE\n                @ref EXT4_DE_DIR\n                @ref EXT4_DE_CHRDEV\n                @ref EXT4_DE_BLKDEV\n                @ref EXT4_DE_FIFO\n                @ref EXT4_DE_SOCK\n                @ref EXT4_DE_SYMLINK\n\n @return  Standard error code."]
2839    pub fn ext4_inode_exist(
2840        path: *const ::std::os::raw::c_char,
2841        type_: ::std::os::raw::c_int,
2842    ) -> ::std::os::raw::c_int;
2843}
2844unsafe extern "C" {
2845    #[doc = "@brief Change file/directory/link mode bits.\n\n @param path Path to file/dir/link.\n @param mode New mode bits (for example 0777).\n\n @return  Standard error code."]
2846    pub fn ext4_mode_set(path: *const ::std::os::raw::c_char, mode: u32) -> ::std::os::raw::c_int;
2847}
2848unsafe extern "C" {
2849    #[doc = "@brief Get file/directory/link mode bits.\n\n @param path Path to file/dir/link.\n @param mode New mode bits (for example 0777).\n\n @return  Standard error code."]
2850    pub fn ext4_mode_get(
2851        path: *const ::std::os::raw::c_char,
2852        mode: *mut u32,
2853    ) -> ::std::os::raw::c_int;
2854}
2855unsafe extern "C" {
2856    #[doc = "@brief Change file owner and group.\n\n @param path Path to file/dir/link.\n @param uid  User id.\n @param gid  Group id.\n\n @return  Standard error code."]
2857    pub fn ext4_owner_set(
2858        path: *const ::std::os::raw::c_char,
2859        uid: u32,
2860        gid: u32,
2861    ) -> ::std::os::raw::c_int;
2862}
2863unsafe extern "C" {
2864    #[doc = "@brief Get file/directory/link owner and group.\n\n @param path Path to file/dir/link.\n @param uid  User id.\n @param gid  Group id.\n\n @return  Standard error code."]
2865    pub fn ext4_owner_get(
2866        path: *const ::std::os::raw::c_char,
2867        uid: *mut u32,
2868        gid: *mut u32,
2869    ) -> ::std::os::raw::c_int;
2870}
2871unsafe extern "C" {
2872    #[doc = "@brief Set file/directory/link access time.\n\n @param path  Path to file/dir/link.\n @param atime Access timestamp.\n\n @return  Standard error code."]
2873    pub fn ext4_atime_set(path: *const ::std::os::raw::c_char, atime: u32)
2874        -> ::std::os::raw::c_int;
2875}
2876unsafe extern "C" {
2877    #[doc = "@brief Set file/directory/link modify time.\n\n @param path  Path to file/dir/link.\n @param mtime Modify timestamp.\n\n @return  Standard error code."]
2878    pub fn ext4_mtime_set(path: *const ::std::os::raw::c_char, mtime: u32)
2879        -> ::std::os::raw::c_int;
2880}
2881unsafe extern "C" {
2882    #[doc = "@brief Set file/directory/link change time.\n\n @param path  Path to file/dir/link.\n @param ctime Change timestamp.\n\n @return  Standard error code."]
2883    pub fn ext4_ctime_set(path: *const ::std::os::raw::c_char, ctime: u32)
2884        -> ::std::os::raw::c_int;
2885}
2886unsafe extern "C" {
2887    #[doc = "@brief Get file/directory/link access time.\n\n @param path  Path to file/dir/link.\n @param atime Access timestamp.\n\n @return  Standard error code."]
2888    pub fn ext4_atime_get(
2889        path: *const ::std::os::raw::c_char,
2890        atime: *mut u32,
2891    ) -> ::std::os::raw::c_int;
2892}
2893unsafe extern "C" {
2894    #[doc = "@brief Get file/directory/link modify time.\n\n @param path  Path to file/dir/link.\n @param mtime Modify timestamp.\n\n @return  Standard error code."]
2895    pub fn ext4_mtime_get(
2896        path: *const ::std::os::raw::c_char,
2897        mtime: *mut u32,
2898    ) -> ::std::os::raw::c_int;
2899}
2900unsafe extern "C" {
2901    #[doc = "@brief Get file/directory/link change time.\n\n @param path  Pathto file/dir/link.\n @param ctime Change timestamp.\n\n @return  standard error code"]
2902    pub fn ext4_ctime_get(
2903        path: *const ::std::os::raw::c_char,
2904        ctime: *mut u32,
2905    ) -> ::std::os::raw::c_int;
2906}
2907unsafe extern "C" {
2908    #[doc = "@brief Create symbolic link.\n\n @param target Destination entry path.\n @param path   Source entry path.\n\n @return  Standard error code."]
2909    pub fn ext4_fsymlink(
2910        target: *const ::std::os::raw::c_char,
2911        path: *const ::std::os::raw::c_char,
2912    ) -> ::std::os::raw::c_int;
2913}
2914unsafe extern "C" {
2915    #[doc = "@brief Create special file.\n @param path     Path to new special file.\n @param filetype Filetype of the new special file.\n \t           (that must not be regular file, directory, or unknown type)\n @param dev      If filetype is char device or block device,\n \t           the device number will become the payload in the inode.\n @return  Standard error code."]
2916    pub fn ext4_mknod(
2917        path: *const ::std::os::raw::c_char,
2918        filetype: ::std::os::raw::c_int,
2919        dev: u32,
2920    ) -> ::std::os::raw::c_int;
2921}
2922unsafe extern "C" {
2923    #[doc = "@brief Read symbolic link payload.\n\n @param path    Path to symlink.\n @param buf     Output buffer.\n @param bufsize Output buffer max size.\n @param rcnt    Bytes read.\n\n @return  Standard error code."]
2924    pub fn ext4_readlink(
2925        path: *const ::std::os::raw::c_char,
2926        buf: *mut ::std::os::raw::c_char,
2927        bufsize: usize,
2928        rcnt: *mut usize,
2929    ) -> ::std::os::raw::c_int;
2930}
2931unsafe extern "C" {
2932    #[doc = "@brief Set extended attribute.\n\n @param path      Path to file/directory\n @param name      Name of the entry to add.\n @param name_len  Length of @name in bytes.\n @param data      Data of the entry to add.\n @param data_size Size of data to add.\n\n @return  Standard error code."]
2933    pub fn ext4_setxattr(
2934        path: *const ::std::os::raw::c_char,
2935        name: *const ::std::os::raw::c_char,
2936        name_len: usize,
2937        data: *const ::std::os::raw::c_void,
2938        data_size: usize,
2939    ) -> ::std::os::raw::c_int;
2940}
2941unsafe extern "C" {
2942    #[doc = "@brief Get extended attribute.\n\n @param path      Path to file/directory.\n @param name      Name of the entry to get.\n @param name_len  Length of @name in bytes.\n @param buf      Data of the entry to get.\n @param buf_size Size of data to get.\n\n @return  Standard error code."]
2943    pub fn ext4_getxattr(
2944        path: *const ::std::os::raw::c_char,
2945        name: *const ::std::os::raw::c_char,
2946        name_len: usize,
2947        buf: *mut ::std::os::raw::c_void,
2948        buf_size: usize,
2949        data_size: *mut usize,
2950    ) -> ::std::os::raw::c_int;
2951}
2952unsafe extern "C" {
2953    #[doc = "@brief List extended attributes.\n\n @param path     Path to file/directory.\n @param list     List to hold the name of entries.\n @param size     Size of @list in bytes.\n @param ret_size Used bytes of @list.\n\n @return  Standard error code."]
2954    pub fn ext4_listxattr(
2955        path: *const ::std::os::raw::c_char,
2956        list: *mut ::std::os::raw::c_char,
2957        size: usize,
2958        ret_size: *mut usize,
2959    ) -> ::std::os::raw::c_int;
2960}
2961unsafe extern "C" {
2962    #[doc = "@brief Remove extended attribute.\n\n @param path     Path to file/directory.\n @param name     Name of the entry to remove.\n @param name_len Length of @name in bytes.\n\n @return  Standard error code."]
2963    pub fn ext4_removexattr(
2964        path: *const ::std::os::raw::c_char,
2965        name: *const ::std::os::raw::c_char,
2966        name_len: usize,
2967    ) -> ::std::os::raw::c_int;
2968}
2969unsafe extern "C" {
2970    #[doc = "@brief   Recursive directory remove.\n\n @param   path Directory path to remove\n\n @return  Standard error code."]
2971    pub fn ext4_dir_rm(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2972}
2973unsafe extern "C" {
2974    #[doc = "@brief Rename/move directory.\n\n @param path     Source path.\n @param new_path Destination path.\n\n @return  Standard error code."]
2975    pub fn ext4_dir_mv(
2976        path: *const ::std::os::raw::c_char,
2977        new_path: *const ::std::os::raw::c_char,
2978    ) -> ::std::os::raw::c_int;
2979}
2980unsafe extern "C" {
2981    #[doc = "@brief   Create new directory.\n\n @param   path Directory name.\n\n @return  Standard error code."]
2982    pub fn ext4_dir_mk(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2983}
2984unsafe extern "C" {
2985    #[doc = "@brief   Directory open.\n\n @param   dir  Directory handle.\n @param   path Directory path.\n\n @return  Standard error code."]
2986    pub fn ext4_dir_open(
2987        dir: *mut ext4_dir,
2988        path: *const ::std::os::raw::c_char,
2989    ) -> ::std::os::raw::c_int;
2990}
2991unsafe extern "C" {
2992    #[doc = "@brief   Directory close.\n\n @param   dir directory handle.\n\n @return  Standard error code."]
2993    pub fn ext4_dir_close(dir: *mut ext4_dir) -> ::std::os::raw::c_int;
2994}
2995unsafe extern "C" {
2996    #[doc = "@brief   Return next directory entry.\n\n @param   dir Directory handle.\n\n @return  Directory entry id (NULL if no entry)"]
2997    pub fn ext4_dir_entry_next(dir: *mut ext4_dir) -> *const ext4_direntry;
2998}
2999unsafe extern "C" {
3000    #[doc = "@brief   Rewine directory entry offset.\n\n @param   dir Directory handle."]
3001    pub fn ext4_dir_entry_rewind(dir: *mut ext4_dir);
3002}
3003#[repr(C)]
3004#[derive(Debug, Copy, Clone)]
3005pub struct ext4_fs {
3006    pub read_only: bool,
3007    pub bdev: *mut ext4_blockdev,
3008    pub sb: ext4_sblock,
3009    pub inode_block_limits: [u64; 4usize],
3010    pub inode_blocks_per_level: [u64; 4usize],
3011    pub last_inode_bg_id: u32,
3012    pub jbd_fs: *mut jbd_fs,
3013    pub jbd_journal: *mut jbd_journal,
3014    pub curr_trans: *mut jbd_trans,
3015    pub inode_alloc_lock: ::std::option::Option<unsafe extern "C" fn()>,
3016    pub inode_alloc_unlock: ::std::option::Option<unsafe extern "C" fn()>,
3017    pub block_alloc_lock: ::std::option::Option<unsafe extern "C" fn()>,
3018    pub block_alloc_unlock: ::std::option::Option<unsafe extern "C" fn()>,
3019    pub bcache_lock: ::std::option::Option<unsafe extern "C" fn()>,
3020    pub bcache_unlock: ::std::option::Option<unsafe extern "C" fn()>,
3021}
3022#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3023const _: () = {
3024    ["Size of ext4_fs"][::std::mem::size_of::<ext4_fs>() - 1184usize];
3025    ["Alignment of ext4_fs"][::std::mem::align_of::<ext4_fs>() - 8usize];
3026    ["Offset of field: ext4_fs::read_only"][::std::mem::offset_of!(ext4_fs, read_only) - 0usize];
3027    ["Offset of field: ext4_fs::bdev"][::std::mem::offset_of!(ext4_fs, bdev) - 8usize];
3028    ["Offset of field: ext4_fs::sb"][::std::mem::offset_of!(ext4_fs, sb) - 16usize];
3029    ["Offset of field: ext4_fs::inode_block_limits"]
3030        [::std::mem::offset_of!(ext4_fs, inode_block_limits) - 1040usize];
3031    ["Offset of field: ext4_fs::inode_blocks_per_level"]
3032        [::std::mem::offset_of!(ext4_fs, inode_blocks_per_level) - 1072usize];
3033    ["Offset of field: ext4_fs::last_inode_bg_id"]
3034        [::std::mem::offset_of!(ext4_fs, last_inode_bg_id) - 1104usize];
3035    ["Offset of field: ext4_fs::jbd_fs"][::std::mem::offset_of!(ext4_fs, jbd_fs) - 1112usize];
3036    ["Offset of field: ext4_fs::jbd_journal"]
3037        [::std::mem::offset_of!(ext4_fs, jbd_journal) - 1120usize];
3038    ["Offset of field: ext4_fs::curr_trans"]
3039        [::std::mem::offset_of!(ext4_fs, curr_trans) - 1128usize];
3040    ["Offset of field: ext4_fs::inode_alloc_lock"]
3041        [::std::mem::offset_of!(ext4_fs, inode_alloc_lock) - 1136usize];
3042    ["Offset of field: ext4_fs::inode_alloc_unlock"]
3043        [::std::mem::offset_of!(ext4_fs, inode_alloc_unlock) - 1144usize];
3044    ["Offset of field: ext4_fs::block_alloc_lock"]
3045        [::std::mem::offset_of!(ext4_fs, block_alloc_lock) - 1152usize];
3046    ["Offset of field: ext4_fs::block_alloc_unlock"]
3047        [::std::mem::offset_of!(ext4_fs, block_alloc_unlock) - 1160usize];
3048    ["Offset of field: ext4_fs::bcache_lock"]
3049        [::std::mem::offset_of!(ext4_fs, bcache_lock) - 1168usize];
3050    ["Offset of field: ext4_fs::bcache_unlock"]
3051        [::std::mem::offset_of!(ext4_fs, bcache_unlock) - 1176usize];
3052};
3053#[repr(C)]
3054#[derive(Debug, Copy, Clone)]
3055pub struct ext4_block_group_ref {
3056    pub block: ext4_block,
3057    pub block_group: *mut ext4_bgroup,
3058    pub fs: *mut ext4_fs,
3059    pub index: u32,
3060    pub dirty: bool,
3061}
3062#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3063const _: () = {
3064    ["Size of ext4_block_group_ref"][::std::mem::size_of::<ext4_block_group_ref>() - 48usize];
3065    ["Alignment of ext4_block_group_ref"][::std::mem::align_of::<ext4_block_group_ref>() - 8usize];
3066    ["Offset of field: ext4_block_group_ref::block"]
3067        [::std::mem::offset_of!(ext4_block_group_ref, block) - 0usize];
3068    ["Offset of field: ext4_block_group_ref::block_group"]
3069        [::std::mem::offset_of!(ext4_block_group_ref, block_group) - 24usize];
3070    ["Offset of field: ext4_block_group_ref::fs"]
3071        [::std::mem::offset_of!(ext4_block_group_ref, fs) - 32usize];
3072    ["Offset of field: ext4_block_group_ref::index"]
3073        [::std::mem::offset_of!(ext4_block_group_ref, index) - 40usize];
3074    ["Offset of field: ext4_block_group_ref::dirty"]
3075        [::std::mem::offset_of!(ext4_block_group_ref, dirty) - 44usize];
3076};
3077#[repr(C)]
3078#[derive(Debug, Copy, Clone)]
3079pub struct ext4_inode_ref {
3080    pub block: ext4_block,
3081    pub inode: *mut ext4_inode,
3082    pub fs: *mut ext4_fs,
3083    pub index: u32,
3084    pub dirty: bool,
3085}
3086#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3087const _: () = {
3088    ["Size of ext4_inode_ref"][::std::mem::size_of::<ext4_inode_ref>() - 48usize];
3089    ["Alignment of ext4_inode_ref"][::std::mem::align_of::<ext4_inode_ref>() - 8usize];
3090    ["Offset of field: ext4_inode_ref::block"]
3091        [::std::mem::offset_of!(ext4_inode_ref, block) - 0usize];
3092    ["Offset of field: ext4_inode_ref::inode"]
3093        [::std::mem::offset_of!(ext4_inode_ref, inode) - 24usize];
3094    ["Offset of field: ext4_inode_ref::fs"][::std::mem::offset_of!(ext4_inode_ref, fs) - 32usize];
3095    ["Offset of field: ext4_inode_ref::index"]
3096        [::std::mem::offset_of!(ext4_inode_ref, index) - 40usize];
3097    ["Offset of field: ext4_inode_ref::dirty"]
3098        [::std::mem::offset_of!(ext4_inode_ref, dirty) - 44usize];
3099};
3100unsafe extern "C" {
3101    pub fn ext4_mountpoint_fs(mountpoint: *const ::std::os::raw::c_char) -> *mut ext4_fs;
3102}
3103unsafe extern "C" {
3104    #[doc = "@brief Initialize filesystem and read all needed data.\n @param fs Filesystem instance to be initialized\n @param bdev Identifier if device with the filesystem\n @param read_only Mark the filesystem as read-only.\n @return Error code"]
3105    pub fn ext4_fs_init(
3106        fs: *mut ext4_fs,
3107        bdev: *mut ext4_blockdev,
3108        read_only: bool,
3109    ) -> ::std::os::raw::c_int;
3110}
3111unsafe extern "C" {
3112    #[doc = "@brief Destroy filesystem instance (used by unmount operation).\n @param fs Filesystem to be destroyed\n @return Error code"]
3113    pub fn ext4_fs_fini(fs: *mut ext4_fs) -> ::std::os::raw::c_int;
3114}
3115unsafe extern "C" {
3116    #[doc = "@brief Check filesystem's features, if supported by this driver\n Function can return EOK and set read_only flag. It mean's that\n there are some not-supported features, that can cause problems\n during some write operations.\n @param fs        Filesystem to be checked\n @param read_only Flag if filesystem should be mounted only for reading\n @return Error code"]
3117    pub fn ext4_fs_check_features(fs: *mut ext4_fs, read_only: *mut bool) -> ::std::os::raw::c_int;
3118}
3119unsafe extern "C" {
3120    #[doc = "@brief Get reference to block group specified by index.\n @param fs   Filesystem to find block group on\n @param bgid Index of block group to load\n @param ref  Output pointer for reference\n @return Error code"]
3121    pub fn ext4_fs_get_block_group_ref(
3122        fs: *mut ext4_fs,
3123        bgid: u32,
3124        ref_: *mut ext4_block_group_ref,
3125    ) -> ::std::os::raw::c_int;
3126}
3127unsafe extern "C" {
3128    #[doc = "@brief Put reference to block group.\n @param ref Pointer for reference to be put back\n @return Error code"]
3129    pub fn ext4_fs_put_block_group_ref(ref_: *mut ext4_block_group_ref) -> ::std::os::raw::c_int;
3130}
3131unsafe extern "C" {
3132    #[doc = "@brief Get reference to i-node specified by index.\n @param fs    Filesystem to find i-node on\n @param index Index of i-node to load\n @param ref   Output pointer for reference\n @return Error code"]
3133    pub fn ext4_fs_get_inode_ref(
3134        fs: *mut ext4_fs,
3135        index: u32,
3136        ref_: *mut ext4_inode_ref,
3137    ) -> ::std::os::raw::c_int;
3138}
3139unsafe extern "C" {
3140    #[doc = "@brief Reset blocks field of i-node.\n @param fs        Filesystem to reset blocks field of i-inode on\n @param inode_ref ref Pointer for inode to be operated on"]
3141    pub fn ext4_fs_inode_blocks_init(fs: *mut ext4_fs, inode_ref: *mut ext4_inode_ref);
3142}
3143unsafe extern "C" {
3144    #[doc = "@brief Put reference to i-node.\n @param ref Pointer for reference to be put back\n @return Error code"]
3145    pub fn ext4_fs_put_inode_ref(ref_: *mut ext4_inode_ref) -> ::std::os::raw::c_int;
3146}
3147unsafe extern "C" {
3148    #[doc = "@brief Convert filetype to inode mode.\n @param filetype File type\n @return inode mode"]
3149    pub fn ext4_fs_correspond_inode_mode(filetype: ::std::os::raw::c_int) -> u32;
3150}
3151unsafe extern "C" {
3152    #[doc = "@brief Allocate new i-node in the filesystem.\n @param fs        Filesystem to allocated i-node on\n @param inode_ref Output pointer to return reference to allocated i-node\n @param filetype  File type of newly created i-node\n @return Error code"]
3153    pub fn ext4_fs_alloc_inode(
3154        fs: *mut ext4_fs,
3155        inode_ref: *mut ext4_inode_ref,
3156        filetype: ::std::os::raw::c_int,
3157    ) -> ::std::os::raw::c_int;
3158}
3159unsafe extern "C" {
3160    #[doc = "@brief Release i-node and mark it as free.\n @param inode_ref I-node to be released\n @return Error code"]
3161    pub fn ext4_fs_free_inode(inode_ref: *mut ext4_inode_ref) -> ::std::os::raw::c_int;
3162}
3163unsafe extern "C" {
3164    #[doc = "@brief Truncate i-node data blocks.\n @param inode_ref I-node to be truncated\n @param new_size  New size of inode (must be < current size)\n @return Error code"]
3165    pub fn ext4_fs_truncate_inode(
3166        inode_ref: *mut ext4_inode_ref,
3167        new_size: u64,
3168    ) -> ::std::os::raw::c_int;
3169}
3170unsafe extern "C" {
3171    #[doc = "@brief Compute 'goal' for inode index\n @param inode_ref Reference to inode, to allocate block for\n @return goal"]
3172    pub fn ext4_fs_inode_to_goal_block(inode_ref: *mut ext4_inode_ref) -> ext4_fsblk_t;
3173}
3174unsafe extern "C" {
3175    #[doc = "@brief Compute 'goal' for allocation algorithm (For blockmap).\n @param inode_ref Reference to inode, to allocate block for\n @return error code"]
3176    pub fn ext4_fs_indirect_find_goal(
3177        inode_ref: *mut ext4_inode_ref,
3178        goal: *mut ext4_fsblk_t,
3179    ) -> ::std::os::raw::c_int;
3180}
3181unsafe extern "C" {
3182    #[doc = "@brief Get physical block address by logical index of the block.\n @param inode_ref I-node to read block address from\n @param iblock            Logical index of block\n @param fblock            Output pointer for return physical\n                          block address\n @param support_unwritten Indicate whether unwritten block range\n                          is supported under the current context\n @return Error code"]
3183    pub fn ext4_fs_get_inode_dblk_idx(
3184        inode_ref: *mut ext4_inode_ref,
3185        iblock: ext4_lblk_t,
3186        fblock: *mut ext4_fsblk_t,
3187        support_unwritten: bool,
3188    ) -> ::std::os::raw::c_int;
3189}
3190unsafe extern "C" {
3191    #[doc = "@brief Initialize a part of unwritten range of the inode.\n @param inode_ref I-node to proceed on.\n @param iblock    Logical index of block\n @param fblock    Output pointer for return physical block address\n @return Error code"]
3192    pub fn ext4_fs_init_inode_dblk_idx(
3193        inode_ref: *mut ext4_inode_ref,
3194        iblock: ext4_lblk_t,
3195        fblock: *mut ext4_fsblk_t,
3196    ) -> ::std::os::raw::c_int;
3197}
3198unsafe extern "C" {
3199    #[doc = "@brief Append following logical block to the i-node.\n @param inode_ref I-node to append block to\n @param fblock    Output physical block address of newly allocated block\n @param iblock    Output logical number of newly allocated block\n @return Error code"]
3200    pub fn ext4_fs_append_inode_dblk(
3201        inode_ref: *mut ext4_inode_ref,
3202        fblock: *mut ext4_fsblk_t,
3203        iblock: *mut ext4_lblk_t,
3204    ) -> ::std::os::raw::c_int;
3205}
3206unsafe extern "C" {
3207    pub fn ext4_fs_insert_inode_dblk(
3208        inode_ref: *mut ext4_inode_ref,
3209        fblock: *mut ext4_fsblk_t,
3210        iblock: ext4_lblk_t,
3211    ) -> ::std::os::raw::c_int;
3212}
3213unsafe extern "C" {
3214    #[doc = "@brief   Increment inode link count.\n @param   inode_ref none handle"]
3215    pub fn ext4_fs_inode_links_count_inc(inode_ref: *mut ext4_inode_ref);
3216}
3217unsafe extern "C" {
3218    #[doc = "@brief   Decrement inode link count.\n @param   inode_ref none handle"]
3219    pub fn ext4_fs_inode_links_count_dec(inode_ref: *mut ext4_inode_ref);
3220}
3221unsafe extern "C" {
3222    #[doc = "@brief   Returns a block group count.\n @param   s superblock descriptor\n @return  count of block groups"]
3223    pub fn ext4_block_group_cnt(s: *mut ext4_sblock) -> u32;
3224}
3225unsafe extern "C" {
3226    #[doc = "@brief   Returns block count in block group\n          (last block group may have less blocks)\n @param   s superblock descriptor\n @param   bgid block group id\n @return  blocks count"]
3227    pub fn ext4_blocks_in_group_cnt(s: *mut ext4_sblock, bgid: u32) -> u32;
3228}
3229unsafe extern "C" {
3230    #[doc = "@brief   Returns inodes count in block group\n          (last block group may have less inodes)\n @param   s superblock descriptor\n @param   bgid block group id\n @return  inodes count"]
3231    pub fn ext4_inodes_in_group_cnt(s: *mut ext4_sblock, bgid: u32) -> u32;
3232}
3233unsafe extern "C" {
3234    #[doc = "@brief   Superblock write.\n @param   bdev block device descriptor.\n @param   s superblock descriptor\n @return  Standard error code"]
3235    pub fn ext4_sb_write(bdev: *mut ext4_blockdev, s: *mut ext4_sblock) -> ::std::os::raw::c_int;
3236}
3237unsafe extern "C" {
3238    #[doc = "@brief   Superblock read.\n @param   bdev block device descriptor.\n @param   s superblock descriptor\n @return  Standard error code"]
3239    pub fn ext4_sb_read(bdev: *mut ext4_blockdev, s: *mut ext4_sblock) -> ::std::os::raw::c_int;
3240}
3241unsafe extern "C" {
3242    #[doc = "@brief   Superblock simple validation.\n @param   s superblock descriptor\n @return  true if OK"]
3243    pub fn ext4_sb_check(s: *mut ext4_sblock) -> bool;
3244}
3245unsafe extern "C" {
3246    #[doc = "@brief   Superblock presence in block group.\n @param   s superblock descriptor\n @param   block_group block group id\n @return  true if block group has superblock"]
3247    pub fn ext4_sb_is_super_in_bg(s: *mut ext4_sblock, block_group: u32) -> bool;
3248}
3249unsafe extern "C" {
3250    #[doc = "@brief   TODO:"]
3251    pub fn ext4_sb_sparse(group: u32) -> bool;
3252}
3253unsafe extern "C" {
3254    #[doc = "@brief   TODO:"]
3255    pub fn ext4_bg_num_gdb(s: *mut ext4_sblock, group: u32) -> u32;
3256}
3257unsafe extern "C" {
3258    #[doc = "@brief   TODO:"]
3259    pub fn ext4_num_base_meta_clusters(s: *mut ext4_sblock, block_group: u32) -> u32;
3260}
3261#[repr(C)]
3262#[derive(Debug, Copy, Clone)]
3263pub struct ext4_dir_iter {
3264    pub inode_ref: *mut ext4_inode_ref,
3265    pub curr_blk: ext4_block,
3266    pub curr_off: u64,
3267    pub curr: *mut ext4_dir_en,
3268}
3269#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3270const _: () = {
3271    ["Size of ext4_dir_iter"][::std::mem::size_of::<ext4_dir_iter>() - 48usize];
3272    ["Alignment of ext4_dir_iter"][::std::mem::align_of::<ext4_dir_iter>() - 8usize];
3273    ["Offset of field: ext4_dir_iter::inode_ref"]
3274        [::std::mem::offset_of!(ext4_dir_iter, inode_ref) - 0usize];
3275    ["Offset of field: ext4_dir_iter::curr_blk"]
3276        [::std::mem::offset_of!(ext4_dir_iter, curr_blk) - 8usize];
3277    ["Offset of field: ext4_dir_iter::curr_off"]
3278        [::std::mem::offset_of!(ext4_dir_iter, curr_off) - 32usize];
3279    ["Offset of field: ext4_dir_iter::curr"][::std::mem::offset_of!(ext4_dir_iter, curr) - 40usize];
3280};
3281#[repr(C)]
3282#[derive(Debug, Copy, Clone)]
3283pub struct ext4_dir_search_result {
3284    pub block: ext4_block,
3285    pub dentry: *mut ext4_dir_en,
3286}
3287#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3288const _: () = {
3289    ["Size of ext4_dir_search_result"][::std::mem::size_of::<ext4_dir_search_result>() - 32usize];
3290    ["Alignment of ext4_dir_search_result"]
3291        [::std::mem::align_of::<ext4_dir_search_result>() - 8usize];
3292    ["Offset of field: ext4_dir_search_result::block"]
3293        [::std::mem::offset_of!(ext4_dir_search_result, block) - 0usize];
3294    ["Offset of field: ext4_dir_search_result::dentry"]
3295        [::std::mem::offset_of!(ext4_dir_search_result, dentry) - 24usize];
3296};
3297unsafe extern "C" {
3298    #[doc = "@brief Verify checksum of a linear directory leaf block\n @param inode_ref Directory i-node\n @param dirent    Linear directory leaf block\n @return true means the block passed checksum verification"]
3299    pub fn ext4_dir_csum_verify(inode_ref: *mut ext4_inode_ref, dirent: *mut ext4_dir_en) -> bool;
3300}
3301unsafe extern "C" {
3302    #[doc = "@brief Initialize directory iterator.\n Set position to the first valid entry from the required position.\n @param it        Pointer to iterator to be initialized\n @param inode_ref Directory i-node\n @param pos       Position to start reading entries from\n @return Error code"]
3303    pub fn ext4_dir_iterator_init(
3304        it: *mut ext4_dir_iter,
3305        inode_ref: *mut ext4_inode_ref,
3306        pos: u64,
3307    ) -> ::std::os::raw::c_int;
3308}
3309unsafe extern "C" {
3310    #[doc = "@brief Jump to the next valid entry\n @param it Initialized iterator\n @return Error code"]
3311    pub fn ext4_dir_iterator_next(it: *mut ext4_dir_iter) -> ::std::os::raw::c_int;
3312}
3313unsafe extern "C" {
3314    #[doc = "@brief Uninitialize directory iterator.\n        Release all allocated structures.\n @param it Iterator to be finished\n @return Error code"]
3315    pub fn ext4_dir_iterator_fini(it: *mut ext4_dir_iter) -> ::std::os::raw::c_int;
3316}
3317unsafe extern "C" {
3318    #[doc = "@brief Write directory entry to concrete data block.\n @param sb        Superblock\n @param en     Pointer to entry to be written\n @param entry_len Length of new entry\n @param child     Child i-node to be written to new entry\n @param name      Name of the new entry\n @param name_len  Length of entry name"]
3319    pub fn ext4_dir_write_entry(
3320        sb: *mut ext4_sblock,
3321        en: *mut ext4_dir_en,
3322        entry_len: u16,
3323        child: *mut ext4_inode_ref,
3324        name: *const ::std::os::raw::c_char,
3325        name_len: usize,
3326    );
3327}
3328unsafe extern "C" {
3329    #[doc = "@brief Add new entry to the directory.\n @param parent Directory i-node\n @param name   Name of new entry\n @param child  I-node to be referenced from new entry\n @return Error code"]
3330    pub fn ext4_dir_add_entry(
3331        parent: *mut ext4_inode_ref,
3332        name: *const ::std::os::raw::c_char,
3333        name_len: u32,
3334        child: *mut ext4_inode_ref,
3335    ) -> ::std::os::raw::c_int;
3336}
3337unsafe extern "C" {
3338    #[doc = "@brief Find directory entry with passed name.\n @param result Result structure to be returned if entry found\n @param parent Directory i-node\n @param name   Name of entry to be found\n @param name_len  Name length\n @return Error code"]
3339    pub fn ext4_dir_find_entry(
3340        result: *mut ext4_dir_search_result,
3341        parent: *mut ext4_inode_ref,
3342        name: *const ::std::os::raw::c_char,
3343        name_len: u32,
3344    ) -> ::std::os::raw::c_int;
3345}
3346unsafe extern "C" {
3347    #[doc = "@brief Remove directory entry.\n @param parent Directory i-node\n @param name   Name of the entry to be removed\n @param name_len  Name length\n @return Error code"]
3348    pub fn ext4_dir_remove_entry(
3349        parent: *mut ext4_inode_ref,
3350        name: *const ::std::os::raw::c_char,
3351        name_len: u32,
3352    ) -> ::std::os::raw::c_int;
3353}
3354unsafe extern "C" {
3355    #[doc = "@brief Try to insert entry to concrete data block.\n @param sb           Superblock\n @param inode_ref    Directory i-node\n @param dst_blk      Block to try to insert entry to\n @param child        Child i-node to be inserted by new entry\n @param name         Name of the new entry\n @param name_len     Length of the new entry name\n @return Error code"]
3356    pub fn ext4_dir_try_insert_entry(
3357        sb: *mut ext4_sblock,
3358        inode_ref: *mut ext4_inode_ref,
3359        dst_blk: *mut ext4_block,
3360        child: *mut ext4_inode_ref,
3361        name: *const ::std::os::raw::c_char,
3362        name_len: u32,
3363    ) -> ::std::os::raw::c_int;
3364}
3365unsafe extern "C" {
3366    #[doc = "@brief Try to find entry in block by name.\n @param block     Block containing entries\n @param sb        Superblock\n @param name_len  Length of entry name\n @param name      Name of entry to be found\n @param res_entry Output pointer to found entry, NULL if not found\n @return Error code"]
3367    pub fn ext4_dir_find_in_block(
3368        block: *mut ext4_block,
3369        sb: *mut ext4_sblock,
3370        name_len: usize,
3371        name: *const ::std::os::raw::c_char,
3372        res_entry: *mut *mut ext4_dir_en,
3373    ) -> ::std::os::raw::c_int;
3374}
3375unsafe extern "C" {
3376    #[doc = "@brief Simple function to release allocated data from result.\n @param parent Parent inode\n @param result Search result to destroy\n @return Error code\n"]
3377    pub fn ext4_dir_destroy_result(
3378        parent: *mut ext4_inode_ref,
3379        result: *mut ext4_dir_search_result,
3380    ) -> ::std::os::raw::c_int;
3381}
3382unsafe extern "C" {
3383    pub fn ext4_dir_set_csum(inode_ref: *mut ext4_inode_ref, dirent: *mut ext4_dir_en);
3384}
3385unsafe extern "C" {
3386    pub fn ext4_dir_init_entry_tail(t: *mut ext4_dir_entry_tail);
3387}
3388unsafe extern "C" {
3389    #[doc = "@brief Get mode of the i-node.\n @param sb    Superblock\n @param inode I-node to load mode from\n @return Mode of the i-node"]
3390    pub fn ext4_inode_get_mode(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u32;
3391}
3392unsafe extern "C" {
3393    #[doc = "@brief Set mode of the i-node.\n @param sb    Superblock\n @param inode I-node to set mode to\n @param mode  Mode to set to i-node"]
3394    pub fn ext4_inode_set_mode(sb: *mut ext4_sblock, inode: *mut ext4_inode, mode: u32);
3395}
3396unsafe extern "C" {
3397    #[doc = "@brief Get ID of the i-node owner (user id).\n @param inode I-node to load uid from\n @return User ID of the i-node owner"]
3398    pub fn ext4_inode_get_uid(inode: *mut ext4_inode) -> u32;
3399}
3400unsafe extern "C" {
3401    #[doc = "@brief Set ID of the i-node owner.\n @param inode I-node to set uid to\n @param uid   ID of the i-node owner"]
3402    pub fn ext4_inode_set_uid(inode: *mut ext4_inode, uid: u32);
3403}
3404unsafe extern "C" {
3405    #[doc = "@brief Get real i-node size.\n @param sb    Superblock\n @param inode I-node to load size from\n @return Real size of i-node"]
3406    pub fn ext4_inode_get_size(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u64;
3407}
3408unsafe extern "C" {
3409    #[doc = "@brief Set real i-node size.\n @param inode I-node to set size to\n @param size  Size of the i-node"]
3410    pub fn ext4_inode_set_size(inode: *mut ext4_inode, size: u64);
3411}
3412unsafe extern "C" {
3413    #[doc = "@brief Get time, when i-node was last accessed.\n @param inode I-node\n @return Time of the last access (POSIX)"]
3414    pub fn ext4_inode_get_access_time(inode: *mut ext4_inode) -> u32;
3415}
3416unsafe extern "C" {
3417    #[doc = "@brief Set time, when i-node was last accessed.\n @param inode I-node\n @param time  Time of the last access (POSIX)"]
3418    pub fn ext4_inode_set_access_time(inode: *mut ext4_inode, time: u32);
3419}
3420unsafe extern "C" {
3421    #[doc = "@brief Get extra time, when i-node was last accessed.\n @param inode I-node\n @return Time of the last access (POSIX)"]
3422    pub fn ext4_inode_get_extra_access_time(inode: *mut ext4_inode) -> u32;
3423}
3424unsafe extern "C" {
3425    #[doc = "@brief Set extra time, when i-node was last accessed.\n @param inode I-node\n @param time  Time of the last access (POSIX)"]
3426    pub fn ext4_inode_set_extra_access_time(inode: *mut ext4_inode, time: u32);
3427}
3428unsafe extern "C" {
3429    #[doc = "@brief Get time, when i-node was last changed.\n @param inode I-node\n @return Time of the last change (POSIX)"]
3430    pub fn ext4_inode_get_change_inode_time(inode: *mut ext4_inode) -> u32;
3431}
3432unsafe extern "C" {
3433    #[doc = "@brief Set time, when i-node was last changed.\n @param inode I-node\n @param time  Time of the last change (POSIX)"]
3434    pub fn ext4_inode_set_change_inode_time(inode: *mut ext4_inode, time: u32);
3435}
3436unsafe extern "C" {
3437    #[doc = "@brief Get extra time, when i-node was last changed.\n @param inode I-node\n @return Time of the last change (POSIX)"]
3438    pub fn ext4_inode_get_extra_change_inode_time(inode: *mut ext4_inode) -> u32;
3439}
3440unsafe extern "C" {
3441    #[doc = "@brief Set extra time, when i-node was last changed.\n @param inode I-node\n @param time  Time of the last change (POSIX)"]
3442    pub fn ext4_inode_set_extra_change_inode_time(inode: *mut ext4_inode, time: u32);
3443}
3444unsafe extern "C" {
3445    #[doc = "@brief Get time, when i-node content was last modified.\n @param inode I-node\n @return Time of the last content modification (POSIX)"]
3446    pub fn ext4_inode_get_modif_time(inode: *mut ext4_inode) -> u32;
3447}
3448unsafe extern "C" {
3449    #[doc = "@brief Set time, when i-node content was last modified.\n @param inode I-node\n @param time  Time of the last content modification (POSIX)"]
3450    pub fn ext4_inode_set_modif_time(inode: *mut ext4_inode, time: u32);
3451}
3452unsafe extern "C" {
3453    #[doc = "@brief Get extra time, when i-node content was last modified.\n @param inode I-node\n @return Time of the last content modification (POSIX)"]
3454    pub fn ext4_inode_get_extra_modif_time(inode: *mut ext4_inode) -> u32;
3455}
3456unsafe extern "C" {
3457    #[doc = "@brief Set extra time, when i-node content was last modified.\n @param inode I-node\n @param time  Time of the last content modification (POSIX)"]
3458    pub fn ext4_inode_set_extra_modif_time(inode: *mut ext4_inode, time: u32);
3459}
3460unsafe extern "C" {
3461    #[doc = "@brief Get time, when i-node was deleted.\n @param inode I-node\n @return Time of the delete action (POSIX)"]
3462    pub fn ext4_inode_get_del_time(inode: *mut ext4_inode) -> u32;
3463}
3464unsafe extern "C" {
3465    #[doc = "@brief Set time, when i-node was deleted.\n @param inode I-node\n @param time  Time of the delete action (POSIX)"]
3466    pub fn ext4_inode_set_del_time(inode: *mut ext4_inode, time: u32);
3467}
3468unsafe extern "C" {
3469    #[doc = "@brief Get ID of the i-node owner's group.\n @param inode I-node to load gid from\n @return Group ID of the i-node owner"]
3470    pub fn ext4_inode_get_gid(inode: *mut ext4_inode) -> u32;
3471}
3472unsafe extern "C" {
3473    #[doc = "@brief Set ID to the i-node owner's group.\n @param inode I-node to set gid to\n @param gid   Group ID of the i-node owner"]
3474    pub fn ext4_inode_set_gid(inode: *mut ext4_inode, gid: u32);
3475}
3476unsafe extern "C" {
3477    #[doc = "@brief Get number of links to i-node.\n @param inode I-node to load number of links from\n @return Number of links to i-node"]
3478    pub fn ext4_inode_get_links_cnt(inode: *mut ext4_inode) -> u16;
3479}
3480unsafe extern "C" {
3481    #[doc = "@brief Set number of links to i-node.\n @param inode I-node to set number of links to\n @param cnt Number of links to i-node"]
3482    pub fn ext4_inode_set_links_cnt(inode: *mut ext4_inode, cnt: u16);
3483}
3484unsafe extern "C" {
3485    #[doc = "@brief Get number of 512-bytes blocks used for i-node.\n @param sb    Superblock\n @param inode I-node\n @return Number of 512-bytes blocks"]
3486    pub fn ext4_inode_get_blocks_count(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u64;
3487}
3488unsafe extern "C" {
3489    #[doc = "@brief Set number of 512-bytes blocks used for i-node.\n @param sb    Superblock\n @param inode I-node\n @param cnt Number of 512-bytes blocks\n @return Error code"]
3490    pub fn ext4_inode_set_blocks_count(
3491        sb: *mut ext4_sblock,
3492        inode: *mut ext4_inode,
3493        cnt: u64,
3494    ) -> ::std::os::raw::c_int;
3495}
3496unsafe extern "C" {
3497    #[doc = "@brief Get flags (features) of i-node.\n @param inode I-node to get flags from\n @return Flags (bitmap)"]
3498    pub fn ext4_inode_get_flags(inode: *mut ext4_inode) -> u32;
3499}
3500unsafe extern "C" {
3501    #[doc = "@brief Set flags (features) of i-node.\n @param inode I-node to set flags to\n @param flags Flags to set to i-node"]
3502    pub fn ext4_inode_set_flags(inode: *mut ext4_inode, flags: u32);
3503}
3504unsafe extern "C" {
3505    #[doc = "@brief Get file generation (used by NFS).\n @param inode I-node\n @return File generation"]
3506    pub fn ext4_inode_get_generation(inode: *mut ext4_inode) -> u32;
3507}
3508unsafe extern "C" {
3509    #[doc = "@brief Set file generation (used by NFS).\n @param inode      I-node\n @param gen File generation"]
3510    pub fn ext4_inode_set_generation(inode: *mut ext4_inode, gen_: u32);
3511}
3512unsafe extern "C" {
3513    #[doc = "@brief Get extra I-node size field.\n @param sb         Superblock\n @param inode      I-node\n @return extra I-node size"]
3514    pub fn ext4_inode_get_extra_isize(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u16;
3515}
3516unsafe extern "C" {
3517    #[doc = "@brief Set extra I-node size field.\n @param sb         Superblock\n @param inode      I-node\n @param size       extra I-node size"]
3518    pub fn ext4_inode_set_extra_isize(sb: *mut ext4_sblock, inode: *mut ext4_inode, size: u16);
3519}
3520unsafe extern "C" {
3521    #[doc = "@brief Get address of block, where are extended attributes located.\n @param inode I-node\n @param sb    Superblock\n @return Block address"]
3522    pub fn ext4_inode_get_file_acl(inode: *mut ext4_inode, sb: *mut ext4_sblock) -> u64;
3523}
3524unsafe extern "C" {
3525    #[doc = "@brief Set address of block, where are extended attributes located.\n @param inode    I-node\n @param sb       Superblock\n @param acl Block address"]
3526    pub fn ext4_inode_set_file_acl(inode: *mut ext4_inode, sb: *mut ext4_sblock, acl: u64);
3527}
3528unsafe extern "C" {
3529    #[doc = "@brief Get block address of specified direct block.\n @param inode I-node to load block from\n @param idx   Index of logical block\n @return Physical block address"]
3530    pub fn ext4_inode_get_direct_block(inode: *mut ext4_inode, idx: u32) -> u32;
3531}
3532unsafe extern "C" {
3533    #[doc = "@brief Set block address of specified direct block.\n @param inode  I-node to set block address to\n @param idx    Index of logical block\n @param block Physical block address"]
3534    pub fn ext4_inode_set_direct_block(inode: *mut ext4_inode, idx: u32, block: u32);
3535}
3536unsafe extern "C" {
3537    #[doc = "@brief Get block address of specified indirect block.\n @param inode I-node to get block address from\n @param idx   Index of indirect block\n @return Physical block address"]
3538    pub fn ext4_inode_get_indirect_block(inode: *mut ext4_inode, idx: u32) -> u32;
3539}
3540unsafe extern "C" {
3541    #[doc = "@brief Set block address of specified indirect block.\n @param inode  I-node to set block address to\n @param idx    Index of indirect block\n @param block Physical block address"]
3542    pub fn ext4_inode_set_indirect_block(inode: *mut ext4_inode, idx: u32, block: u32);
3543}
3544unsafe extern "C" {
3545    #[doc = "@brief Get device number\n @param inode  I-node to get device number from\n @return Device number"]
3546    pub fn ext4_inode_get_dev(inode: *mut ext4_inode) -> u32;
3547}
3548unsafe extern "C" {
3549    #[doc = "@brief Set device number\n @param inode  I-node to set device number to\n @param dev    Device number"]
3550    pub fn ext4_inode_set_dev(inode: *mut ext4_inode, dev: u32);
3551}
3552unsafe extern "C" {
3553    #[doc = "@brief return the type of i-node\n @param sb    Superblock\n @param inode I-node to return the type of\n @return Result of check operation"]
3554    pub fn ext4_inode_type(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u32;
3555}
3556unsafe extern "C" {
3557    #[doc = "@brief Check if i-node has specified type.\n @param sb    Superblock\n @param inode I-node to check type of\n @param type  Type to check\n @return Result of check operation"]
3558    pub fn ext4_inode_is_type(sb: *mut ext4_sblock, inode: *mut ext4_inode, type_: u32) -> bool;
3559}
3560unsafe extern "C" {
3561    #[doc = "@brief Check if i-node has specified flag.\n @param inode I-node to check flags of\n @param f  Flag to check\n @return Result of check operation"]
3562    pub fn ext4_inode_has_flag(inode: *mut ext4_inode, f: u32) -> bool;
3563}
3564unsafe extern "C" {
3565    #[doc = "@brief Remove specified flag from i-node.\n @param inode      I-node to clear flag on\n @param f Flag to be cleared"]
3566    pub fn ext4_inode_clear_flag(inode: *mut ext4_inode, f: u32);
3567}
3568unsafe extern "C" {
3569    #[doc = "@brief Set specified flag to i-node.\n @param inode    I-node to set flag on\n @param f Flag to be set"]
3570    pub fn ext4_inode_set_flag(inode: *mut ext4_inode, f: u32);
3571}
3572unsafe extern "C" {
3573    #[doc = "@brief Get inode checksum(crc32)\n @param sb    Superblock\n @param inode I-node to get checksum value from"]
3574    pub fn ext4_inode_get_csum(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u32;
3575}
3576unsafe extern "C" {
3577    #[doc = "@brief Get inode checksum(crc32)\n @param sb    Superblock\n @param inode I-node to get checksum value from"]
3578    pub fn ext4_inode_set_csum(sb: *mut ext4_sblock, inode: *mut ext4_inode, checksum: u32);
3579}
3580unsafe extern "C" {
3581    #[doc = "@brief Check if i-node can be truncated.\n @param sb    Superblock\n @param inode I-node to check\n @return Result of the check operation"]
3582    pub fn ext4_inode_can_truncate(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> bool;
3583}
3584#[repr(C)]
3585#[derive(Debug, Copy, Clone)]
3586pub struct ext4_extent_header {
3587    _unused: [u8; 0],
3588}
3589unsafe extern "C" {
3590    #[doc = "@brief Get extent header from the root of the extent tree.\n @param inode I-node to get extent header from\n @return Pointer to extent header of the root node"]
3591    pub fn ext4_inode_get_extent_header(inode: *mut ext4_inode) -> *mut ext4_extent_header;
3592}
3593unsafe extern "C" {
3594    pub fn ext4_extent_tree_init(inode_ref: *mut ext4_inode_ref);
3595}
3596unsafe extern "C" {
3597    pub fn ext4_extent_get_blocks(
3598        inode_ref: *mut ext4_inode_ref,
3599        iblock: ext4_lblk_t,
3600        max_blocks: u32,
3601        result: *mut ext4_fsblk_t,
3602        create: bool,
3603        blocks_count: *mut u32,
3604    ) -> ::std::os::raw::c_int;
3605}
3606unsafe extern "C" {
3607    #[doc = "@brief Release all data blocks starting from specified logical block.\n @param inode_ref   I-node to release blocks from\n @param iblock_from First logical block to release\n @return Error code"]
3608    pub fn ext4_extent_remove_space(
3609        inode_ref: *mut ext4_inode_ref,
3610        from: ext4_lblk_t,
3611        to: ext4_lblk_t,
3612    ) -> ::std::os::raw::c_int;
3613}
3614#[repr(C)]
3615#[derive(Debug, Copy, Clone)]
3616pub struct __va_list_tag {
3617    pub gp_offset: ::std::os::raw::c_uint,
3618    pub fp_offset: ::std::os::raw::c_uint,
3619    pub overflow_arg_area: *mut ::std::os::raw::c_void,
3620    pub reg_save_area: *mut ::std::os::raw::c_void,
3621    _unused: [u8; 0],
3622}
3623pub type __builtin_va_list = [__va_list_tag; 1usize];
3624#[repr(C)]
3625#[derive(Debug, Copy, Clone)]
3626pub struct jbd_fs {
3627    pub _address: u8,
3628}
3629#[repr(C)]
3630#[derive(Debug, Copy, Clone)]
3631pub struct jbd_journal {
3632    pub _address: u8,
3633}
3634#[repr(C)]
3635#[derive(Debug, Copy, Clone)]
3636pub struct jbd_trans {
3637    pub _address: u8,
3638}