ext2_fs.h revision 3166c58dc0e2be55c9414e019607902c85485e83
19f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
29f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *  linux/include/linux/ext2_fs.h
39f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *
49f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Copyright (C) 1992, 1993, 1994, 1995
59f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Remy Card (card@masi.ibp.fr)
69f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Laboratoire MASI - Institut Blaise Pascal
79f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Universite Pierre et Marie Curie (Paris VI)
89f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *
99f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *  from
109f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *
119f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *  linux/include/linux/minix_fs.h
129f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *
139f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *  Copyright (C) 1991, 1992  Linus Torvalds
149f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
159f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
169f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#ifndef _LINUX_EXT2_FS_H
179f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define _LINUX_EXT2_FS_H
189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
19797f5ef14e92294b329e52971d467d7af5b2993eTheodore Ts'o#include <ext2fs/ext2_types.h>		/* Changed from linux/types.h */
209f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
219f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
229f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * The second extended filesystem constants/structures
239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
259f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
269f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Define EXT2FS_DEBUG to produce debug messages
279f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
289f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#undef EXT2FS_DEBUG
299f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
309f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
319f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
329f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
339f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_PREALLOCATE
349f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_DEFAULT_PREALLOC_BLOCKS	8
359f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
369f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
379f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * The second extended file system version
389f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
399f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2FS_DATE		"95/08/09"
409f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2FS_VERSION		"0.5b"
419f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
429f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
430fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger * Special inode numbers
449f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
450fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_BAD_INO		 1	/* Bad blocks inode */
469f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ROOT_INO		 2	/* Root inode */
479f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ACL_IDX_INO	 3	/* ACL inode */
489f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ACL_DATA_INO	 4	/* ACL inode */
499f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_BOOT_LOADER_INO	 5	/* Boot loader inode */
509f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_UNDEL_DIR_INO	 6	/* Undelete directory inode */
519f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_RESIZE_INO		 7	/* Reserved group descriptors inode */
529f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_JOURNAL_INO	 8	/* Journal inode */
539f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
549f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/* First non-reserved inode for old ext2 filesystems */
559f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_GOOD_OLD_FIRST_INO	11
569f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
579f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
589f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * The second extended file system magic number
599f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
609f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_SUPER_MAGIC	0xEF53
619f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
620fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#ifdef __KERNEL__
630fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_SB(sb)	(&((sb)->u.ext2_sb))
640fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#else
650fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger/* Assume that user mode programs are passing in an ext2fs superblock, not
660fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger * a kernel struct super_block.  This will allow us to call the feature-test
670fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger * macros from user land. */
680fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_SB(sb)	(sb)
690fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#endif
700fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger
719f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
729f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Maximal count of links to a file
739f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
74bec6f49a46ec78a4c5928a22214848a7ea654704Theodore Ts'o#define EXT2_LINK_MAX		65000
759f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
769f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
779f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Macro-instructions used to manage several block sizes
789f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
79932a489cdf6bc83d69e59d3f8e0a57b733799ce1Andreas Dilger#define EXT2_MIN_BLOCK_LOG_SIZE		10	/* 1024 */
8039dc1c45cb41ce37a56d364103bb852d0b62c835Theodore Ts'o#define EXT2_MAX_BLOCK_LOG_SIZE		16	/* 65536 */
817da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_MIN_BLOCK_SIZE	(1 << EXT2_MIN_BLOCK_LOG_SIZE)
827da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_MAX_BLOCK_SIZE	(1 << EXT2_MAX_BLOCK_LOG_SIZE)
839f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#ifdef __KERNEL__
847da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_BLOCK_SIZE(s)	((s)->s_blocksize)
857da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_BLOCK_SIZE_BITS(s)	((s)->s_blocksize_bits)
860fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_ADDR_PER_BLOCK_BITS(s)	(EXT2_SB(s)->addr_per_block_bits)
877da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_INODE_SIZE(s)	(EXT2_SB(s)->s_inode_size)
887da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_FIRST_INO(s)	(EXT2_SB(s)->s_first_ino)
899f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#else
907da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_BLOCK_SIZE(s)	(EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
917da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_BLOCK_SIZE_BITS(s)	((s)->s_log_block_size + 10)
929f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_INODE_SIZE(s)	(((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
937da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger				 EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
949f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FIRST_INO(s)	(((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
957da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger				 EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
969f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#endif
977da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#define EXT2_ADDR_PER_BLOCK(s)	(EXT2_BLOCK_SIZE(s) / sizeof(__u32))
989f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
999f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
1009f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Macro-instructions used to manage fragments
1019f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
102932a489cdf6bc83d69e59d3f8e0a57b733799ce1Andreas Dilger#define EXT2_MIN_FRAG_SIZE		EXT2_MIN_BLOCK_SIZE
1030fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_MAX_FRAG_SIZE		EXT2_MAX_BLOCK_SIZE
104932a489cdf6bc83d69e59d3f8e0a57b733799ce1Andreas Dilger#define EXT2_MIN_FRAG_LOG_SIZE		EXT2_MIN_BLOCK_LOG_SIZE
1059f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#ifdef __KERNEL__
1060fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger# define EXT2_FRAG_SIZE(s)		(EXT2_SB(s)->s_frag_size)
1070fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger# define EXT2_FRAGS_PER_BLOCK(s)	(EXT2_SB(s)->s_frags_per_block)
1089f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#else
1099f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o# define EXT2_FRAG_SIZE(s)		(EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
1109f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o# define EXT2_FRAGS_PER_BLOCK(s)	(EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
1119f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#endif
1129f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
1139f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
1149f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * ACL structures
1159f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
1169f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_acl_header	/* Header of Access Control Lists */
1179f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o{
1189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	aclh_size;
1199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	aclh_file_count;
1209f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	aclh_acle_count;
1219f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	aclh_first_acle;
1229f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
1239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
1249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_acl_entry	/* Access Control List Entry */
1259f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o{
1269f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	acle_size;
1279f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	acle_perms;	/* Access permissions */
1289f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	acle_type;	/* Type of entry */
1299f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	acle_tag;	/* User or group identity */
1309f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	acle_pad1;
1319f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	acle_next;	/* Pointer on next entry for the */
1329f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o					/* same inode or on next free entry */
1339f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
1349f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
1359f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
1369f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Structure of a blocks group descriptor
1379f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
1389f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_group_desc
1399f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o{
1408061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_block_bitmap;	/* Blocks bitmap block */
1418061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_inode_bitmap;	/* Inodes bitmap block */
1429f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	bg_inode_table;		/* Inodes table block */
1439f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	bg_free_blocks_count;	/* Free blocks count */
1449f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	bg_free_inodes_count;	/* Free inodes count */
1459f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	bg_used_dirs_count;	/* Directories count */
146f5fa20078bfc05b554294fe9c5505375d7913e8cTheodore Ts'o	__u16	bg_flags;
1478815fb8a00f5a441eb62f035353db9e0cca90b38Theodore Ts'o	__u32	bg_reserved[2];
1488815fb8a00f5a441eb62f035353db9e0cca90b38Theodore Ts'o	__u16	bg_itable_unused;	/* Unused inodes count */
1498815fb8a00f5a441eb62f035353db9e0cca90b38Theodore Ts'o	__u16	bg_checksum;		/* crc16(s_uuid+grouo_num+group_desc)*/
1509f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
1519f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
1528061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'ostruct ext4_group_desc
1538061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o{
1548061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_block_bitmap;	/* Blocks bitmap block */
1558061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_inode_bitmap;	/* Inodes bitmap block */
1568061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_inode_table;		/* Inodes table block */
1578061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_free_blocks_count;	/* Free blocks count */
1588061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_free_inodes_count;	/* Free inodes count */
1598061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_used_dirs_count;	/* Directories count */
1608061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_flags;
1618061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_reserved[2];
1628061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_itable_unused;	/* Unused inodes count */
1638061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_checksum;		/* crc16(s_uuid+grouo_num+group_desc)*/
1648061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_block_bitmap_hi;	/* Blocks bitmap block MSB */
1658061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_inode_bitmap_hi;	/* Inodes bitmap block MSB */
1668061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_inode_table_hi;	/* Inodes table block MSB */
1678061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_free_blocks_count_hi;/* Free blocks count MSB */
1688061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_free_inodes_count_hi;/* Free inodes count MSB */
1698061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	bg_used_dirs_count_hi;	/* Directories count MSB */
170d2a3bf2ccc2df5167289e9fc084fec3cea78c950Theodore Ts'o	__u16   bg_pad;
1718061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	bg_reserved2[3];
1728061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o};
1738061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o
174f5fa20078bfc05b554294fe9c5505375d7913e8cTheodore Ts'o#define EXT2_BG_INODE_UNINIT	0x0001 /* Inode table/bitmap not initialized */
175f5fa20078bfc05b554294fe9c5505375d7913e8cTheodore Ts'o#define EXT2_BG_BLOCK_UNINIT	0x0002 /* Block bitmap not initialized */
176f5fa20078bfc05b554294fe9c5505375d7913e8cTheodore Ts'o
1779f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
178df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o * Data structures used by the directory indexing feature
179df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o *
180df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o * Note: all of the multibyte integer fields are little endian.
181df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o */
182df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o
183df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o/*
184df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o * Note: dx_root_info is laid out so that if it should somehow get
185df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o * overlaid by a dirent the two low bits of the hash version will be
186df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o * zero.  Therefore, the hash version mod 4 should never be 0.
187df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o * Sincerely, the paranoia department.
188df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o */
189df614db6ef79c767745b8154c26d69398b571605Theodore Ts'ostruct ext2_dx_root_info {
190df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u32 reserved_zero;
191df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u8 hash_version; /* 0 now, 1 at release */
192df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u8 info_length; /* 8 */
193df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u8 indirect_levels;
194df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u8 unused_flags;
195df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o};
196df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o
197f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_HASH_LEGACY		0
198f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_HASH_HALF_MD4		1
199f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_HASH_TEA			2
200f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_HASH_LEGACY_UNSIGNED	3 /* reserved for userspace lib */
201f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_HASH_HALF_MD4_UNSIGNED	4 /* reserved for userspace lib */
202f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_HASH_TEA_UNSIGNED		5 /* reserved for userspace lib */
203503f9e7f6eb331c5b75d7f1ad126f71bcdcfb4e3Theodore Ts'o
204503f9e7f6eb331c5b75d7f1ad126f71bcdcfb4e3Theodore Ts'o#define EXT2_HASH_FLAG_INCOMPAT	0x1
205503f9e7f6eb331c5b75d7f1ad126f71bcdcfb4e3Theodore Ts'o
206df614db6ef79c767745b8154c26d69398b571605Theodore Ts'ostruct ext2_dx_entry {
207df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u32 hash;
208df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u32 block;
209df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o};
210df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o
211df614db6ef79c767745b8154c26d69398b571605Theodore Ts'ostruct ext2_dx_countlimit {
212df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u16 limit;
213df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o	__u16 count;
214df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o};
215df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o
216df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o
217df614db6ef79c767745b8154c26d69398b571605Theodore Ts'o/*
2189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Macro-instructions used to manage group descriptors
2199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
220b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_BLOCKS_PER_GROUP(s)	(EXT2_SB(s)->s_blocks_per_group)
221b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_INODES_PER_GROUP(s)	(EXT2_SB(s)->s_inodes_per_group)
222b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_INODES_PER_BLOCK(s)	(EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
223b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */
224b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_MAX_BLOCKS_PER_GROUP(s)	((1 << 16) - 8)
225b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_MAX_INODES_PER_GROUP(s)	((1 << 16) - EXT2_INODES_PER_BLOCK(s))
2269f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#ifdef __KERNEL__
227b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_DESC_PER_BLOCK(s)		(EXT2_SB(s)->s_desc_per_block)
228b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_DESC_PER_BLOCK_BITS(s)	(EXT2_SB(s)->s_desc_per_block_bits)
2299f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#else
230b21bf267783274683a432eea6e5c589eab94123eAndreas Dilger#define EXT2_DESC_PER_BLOCK(s)		(EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
2319f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#endif
2329f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
2339f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
2349f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Constants relative to the data blocks
2359f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
2360fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_NDIR_BLOCKS		12
2370fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_IND_BLOCK			EXT2_NDIR_BLOCKS
2380fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_DIND_BLOCK			(EXT2_IND_BLOCK + 1)
2390fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_TIND_BLOCK			(EXT2_DIND_BLOCK + 1)
2400fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_N_BLOCKS			(EXT2_TIND_BLOCK + 1)
2419f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
2429f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
2439f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Inode flags
2449f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
2450fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_SECRM_FL			0x00000001 /* Secure deletion */
2460fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_UNRM_FL			0x00000002 /* Undelete */
2470fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_COMPR_FL			0x00000004 /* Compress file */
2489f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_SYNC_FL			0x00000008 /* Synchronous updates */
2499f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_IMMUTABLE_FL		0x00000010 /* Immutable file */
2509f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_APPEND_FL			0x00000020 /* writes to file may only append */
2519f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_NODUMP_FL			0x00000040 /* do not dump file */
2529f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_NOATIME_FL			0x00000080 /* do not update atime */
2539f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/* Reserved for compression usage... */
2549f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_DIRTY_FL			0x00000100
2559f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_COMPRBLK_FL		0x00000200 /* One or more compressed clusters */
2560fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_NOCOMPR_FL			0x00000400 /* Access raw compressed data */
2579f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ECOMPR_FL			0x00000800 /* Compression error */
2580fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger/* End compression flags --- maybe not all used */
2599f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_BTREE_FL			0x00001000 /* btree format dir */
260b10820cdcd5f007894b81cf716cf1fdd8523bbcaTheodore Ts'o#define EXT2_INDEX_FL			0x00001000 /* hash-indexed directory */
2619f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_IMAGIC_FL			0x00002000
2629f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT3_JOURNAL_DATA_FL		0x00004000 /* file data should be journaled */
263b3f5b4c22939daba86465d05842bce76053bc3cfTheodore Ts'o#define EXT2_NOTAIL_FL			0x00008000 /* file tail should not be merged */
26488372d5c4b2ebd0405446b42de65bf2b0ebb2408Theodore Ts'o#define EXT2_DIRSYNC_FL 		0x00010000 /* Synchronous directory modifications */
26515f9011add4013d32ea2f7ca7dbf860f95b8ec53Theodore Ts'o#define EXT2_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
2668fe81a3d53fbaa1670ece5fb7fd11dd5ae45b8daAndreas Dilger#define EXT4_EXTENTS_FL 		0x00080000 /* Inode uses extents */
2679f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_RESERVED_FL		0x80000000 /* reserved for ext2 lib */
2689f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
2698fe81a3d53fbaa1670ece5fb7fd11dd5ae45b8daAndreas Dilger#define EXT2_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
270b3f5b4c22939daba86465d05842bce76053bc3cfTheodore Ts'o#define EXT2_FL_USER_MODIFIABLE		0x000080FF /* User modifiable flags */
2719f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
2729f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
2739f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * ioctl commands
2749f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
275bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o
276bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o/* Used for online resize */
277bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'ostruct ext2_new_group_input {
278bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u32 group;		/* Group number for this data */
279bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u32 block_bitmap;	/* Absolute block number of block bitmap */
280bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u32 inode_bitmap;	/* Absolute block number of inode bitmap */
281bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u32 inode_table;	/* Absolute block number of inode table start */
282bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u32 blocks_count;	/* Total number of blocks in this group */
283bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u16 reserved_blocks;	/* Number of reserved blocks in this group */
284bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o	__u16 unused;		/* Number of reserved GDT blocks in group */
285bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o};
286bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o
2873166c58dc0e2be55c9414e019607902c85485e83Theodore Ts'o#ifdef __GNU__			/* Needed for the Hurd */
2883166c58dc0e2be55c9414e019607902c85485e83Theodore Ts'o#define _IOT_ext2_new_group_input _IOT (_IOTS(__u32), 5, _IOTS(__u16), 2, 0, 0)
2893166c58dc0e2be55c9414e019607902c85485e83Theodore Ts'o#endif
2903166c58dc0e2be55c9414e019607902c85485e83Theodore Ts'o
2910fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_IOC_GETFLAGS		_IOR('f', 1, long)
2920fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_IOC_SETFLAGS		_IOW('f', 2, long)
2930fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_IOC_GETVERSION		_IOR('v', 1, long)
2940fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_IOC_SETVERSION		_IOW('v', 2, long)
295bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o#define EXT2_IOC_GETVERSION_NEW		_IOR('f', 3, long)
296bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o#define EXT2_IOC_SETVERSION_NEW		_IOW('f', 4, long)
297bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o#define EXT2_IOC_GROUP_EXTEND		_IOW('f', 7, unsigned long)
298bf69235ad0073c80386b70caba0e1b58e5f85697Theodore Ts'o#define EXT2_IOC_GROUP_ADD		_IOW('f', 8,struct ext2_new_group_input)
2999f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
3009f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
3019f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Structure of an inode on the disk
3029f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
3039f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_inode {
3049f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	i_mode;		/* File mode */
3059f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	i_uid;		/* Low 16 bits of Owner Uid */
3069f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_size;		/* Size in bytes */
3079f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_atime;	/* Access time */
3086b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_ctime;	/* Inode change time */
3099f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_mtime;	/* Modification time */
3109f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_dtime;	/* Deletion Time */
3119f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	i_gid;		/* Low 16 bits of Group Id */
3129f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	i_links_count;	/* Links count */
3139f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_blocks;	/* Blocks count */
3149f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_flags;	/* File flags */
3159f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	union {
3169f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		struct {
317d362a3fb7ec1a2b46601f55f4dbae83563c27717Theodore Ts'o			__u32	l_i_version; /* was l_i_reserved1 */
3189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		} linux1;
3199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		struct {
3209f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u32  h_i_translator;
3219f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		} hurd1;
3229f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		struct {
3239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u32  m_i_reserved1;
3249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		} masix1;
3259f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	} osd1;				/* OS dependent 1 */
3269f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
3279f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_generation;	/* File version (for NFS) */
3289f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_file_acl;	/* File ACL */
3299f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_dir_acl;	/* Directory ACL */
3309f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	i_faddr;	/* Fragment address */
3319f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	union {
3329f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		struct {
3335d17119d14fe1276936c85d7986695a4543b1aa1Theodore Ts'o			__u16	l_i_blocks_hi;
3349f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	i_pad1;
3359f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	l_i_uid_high;	/* these 2 fields    */
3369f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	l_i_gid_high;	/* were reserved2[0] */
3379f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u32	l_i_reserved2;
3389f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		} linux2;
3399f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		struct {
3409f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u8	h_i_frag;	/* Fragment number */
3419f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u8	h_i_fsize;	/* Fragment size */
3429f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	h_i_mode_high;
3439f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	h_i_uid_high;
3449f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	h_i_gid_high;
3459f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u32	h_i_author;
3469f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		} hurd2;
3479f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		struct {
3489f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u8	m_i_frag;	/* Fragment number */
3499f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u8	m_i_fsize;	/* Fragment size */
3509f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u16	m_pad1;
3519f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o			__u32	m_i_reserved2[2];
3529f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o		} masix2;
3539f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	} osd2;				/* OS dependent 2 */
3549f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
3559f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
3567331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o/*
3577331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o * Permanent part of an large inode on the disk
3587331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o */
3597331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'ostruct ext2_inode_large {
3607331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u16	i_mode;		/* File mode */
3617331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u16	i_uid;		/* Low 16 bits of Owner Uid */
3627331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_size;		/* Size in bytes */
3637331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_atime;	/* Access time */
3646b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_ctime;	/* Inode Change time */
3657331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_mtime;	/* Modification time */
3667331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_dtime;	/* Deletion Time */
3677331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u16	i_gid;		/* Low 16 bits of Group Id */
3687331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u16	i_links_count;	/* Links count */
3697331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_blocks;	/* Blocks count */
3707331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_flags;	/* File flags */
3717331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	union {
3727331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		struct {
373d362a3fb7ec1a2b46601f55f4dbae83563c27717Theodore Ts'o			__u32	l_i_version; /* was l_i_reserved1 */
3747331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		} linux1;
3757331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		struct {
3767331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u32  h_i_translator;
3777331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		} hurd1;
3787331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		struct {
3797331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u32  m_i_reserved1;
3807331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		} masix1;
3817331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	} osd1;				/* OS dependent 1 */
3827331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
3837331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_generation;	/* File version (for NFS) */
3847331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_file_acl;	/* File ACL */
3857331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_dir_acl;	/* Directory ACL */
3867331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u32	i_faddr;	/* Fragment address */
3877331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	union {
3887331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		struct {
3895d17119d14fe1276936c85d7986695a4543b1aa1Theodore Ts'o			__u16	l_i_blocks_hi;
3907331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	i_pad1;
3917331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	l_i_uid_high;	/* these 2 fields    */
3927331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	l_i_gid_high;	/* were reserved2[0] */
3937331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u32	l_i_reserved2;
3947331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		} linux2;
3957331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		struct {
3967331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u8	h_i_frag;	/* Fragment number */
3977331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u8	h_i_fsize;	/* Fragment size */
3987331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	h_i_mode_high;
3997331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	h_i_uid_high;
4007331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	h_i_gid_high;
4017331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u32	h_i_author;
4027331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		} hurd2;
4037331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		struct {
4047331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u8	m_i_frag;	/* Fragment number */
4057331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u8	m_i_fsize;	/* Fragment size */
4067331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u16	m_pad1;
4077331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o			__u32	m_i_reserved2[2];
4087331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o		} masix2;
4097331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	} osd2;				/* OS dependent 2 */
4107331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u16	i_extra_isize;
4117331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o	__u16	i_pad1;
4126b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_ctime_extra;	/* extra Change time (nsec << 2 | epoch) */
4136b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_mtime_extra;	/* extra Modification time (nsec << 2 | epoch) */
4146b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_atime_extra;	/* extra Access time (nsec << 2 | epoch) */
4156b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_crtime;	/* File creation time */
4166b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u32	i_crtime_extra;	/* extra File creation time (nsec << 2 | epoch)*/
4177331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o};
4187331196a16e57ef80dd6ae40eeeab14747ce2f5dTheodore Ts'o
4199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_size_high	i_dir_acl
4209f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4219f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#if defined(__KERNEL__) || defined(__linux__)
4229f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_reserved1	osd1.linux1.l_i_reserved1
4239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_frag		osd2.linux2.l_i_frag
4249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_fsize		osd2.linux2.l_i_fsize
4259f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_uid_low	i_uid
4269f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_gid_low	i_gid
4279f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_uid_high	osd2.linux2.l_i_uid_high
4289f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_gid_high	osd2.linux2.l_i_gid_high
4299f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_reserved2	osd2.linux2.l_i_reserved2
4305113a6e32b298671c86ae7da097bcd24540cebc9Eric Sandeen#define inode_uid(inode)	((inode).i_uid | (inode).i_uid_high << 16)
4315113a6e32b298671c86ae7da097bcd24540cebc9Eric Sandeen#define inode_gid(inode)	((inode).i_gid | (inode).i_gid_high << 16)
43248e6e81362f264aee4f3945c14928efaf71a06c9Theodore Ts'o#else
43348e6e81362f264aee4f3945c14928efaf71a06c9Theodore Ts'o#if defined(__GNU__)
4349f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4359f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_translator	osd1.hurd1.h_i_translator
4369f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_frag		osd2.hurd2.h_i_frag;
4379f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_fsize		osd2.hurd2.h_i_fsize;
4389f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_uid_high	osd2.hurd2.h_i_uid_high
4399f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_gid_high	osd2.hurd2.h_i_gid_high
4409f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_author	osd2.hurd2.h_i_author
4415113a6e32b298671c86ae7da097bcd24540cebc9Eric Sandeen#define inode_uid(inode)	((inode).i_uid | (inode).i_uid_high << 16)
4425113a6e32b298671c86ae7da097bcd24540cebc9Eric Sandeen#define inode_gid(inode)	((inode).i_gid | (inode).i_gid_high << 16)
4439f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
44448e6e81362f264aee4f3945c14928efaf71a06c9Theodore Ts'o#else
44548e6e81362f264aee4f3945c14928efaf71a06c9Theodore Ts'o#if defined(__masix__)
4469f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4479f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_reserved1	osd1.masix1.m_i_reserved1
4489f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_frag		osd2.masix2.m_i_frag
4499f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_fsize		osd2.masix2.m_i_fsize
4509f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define i_reserved2	osd2.masix2.m_i_reserved2
4515113a6e32b298671c86ae7da097bcd24540cebc9Eric Sandeen#define inode_uid(inode)	((inode).i_uid)
4525113a6e32b298671c86ae7da097bcd24540cebc9Eric Sandeen#define inode_gid(inode)	((inode).i_gid)
4539f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
45448e6e81362f264aee4f3945c14928efaf71a06c9Theodore Ts'o#endif  /* __masix__ */
45548e6e81362f264aee4f3945c14928efaf71a06c9Theodore Ts'o#endif  /* __GNU__ */
4567da78ff17df7d2c1eeebbc2b0727106b63c08a68Andreas Dilger#endif	/* defined(__KERNEL__) || defined(__linux__) */
4579f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4589f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
4599f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * File system states
4609f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
4610fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_VALID_FS			0x0001	/* Unmounted cleanly */
4620fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_ERROR_FS			0x0002	/* Errors detected */
4639f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4649f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
465f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o * Misc. filesystem flags
466f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o */
467f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_FLAGS_SIGNED_HASH		0x0001  /* Signed dirhash in use */
468f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o#define EXT2_FLAGS_UNSIGNED_HASH	0x0002  /* Unsigned dirhash in use */
469f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o
470f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o/*
4719f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Mount flags
4729f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
4739f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_CHECK		0x0001	/* Do mount-time checks */
4749f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_GRPID		0x0004	/* Create files with directory's group */
4759f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_DEBUG		0x0008	/* Some debugging messages */
4769f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_ERRORS_CONT		0x0010	/* Continue on errors */
4779f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_ERRORS_RO		0x0020	/* Remount fs ro on errors */
4789f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_ERRORS_PANIC		0x0040	/* Panic on errors */
4799f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_MINIX_DF		0x0080	/* Mimics the Minix statfs */
4809f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MOUNT_NO_UID32		0x0200  /* Disable 32-bit UIDs */
4819f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4829f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define clear_opt(o, opt)		o &= ~EXT2_MOUNT_##opt
4839f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define set_opt(o, opt)			o |= EXT2_MOUNT_##opt
4840fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define test_opt(sb, opt)		(EXT2_SB(sb)->s_mount_opt & \
4859f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o					 EXT2_MOUNT_##opt)
4869f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
4879f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Maximal mount counts between two filesystem checks
4889f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
4899f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_DFL_MAX_MNT_COUNT		20	/* Allow 20 mounts */
4909f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_DFL_CHECKINTERVAL		0	/* Don't use interval check */
4919f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
4929f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
4939f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Behaviour when detecting errors
4949f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
4959f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ERRORS_CONTINUE		1	/* Continue execution */
4969f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ERRORS_RO			2	/* Remount fs read-only */
4979f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ERRORS_PANIC		3	/* Panic */
4989f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_ERRORS_DEFAULT		EXT2_ERRORS_CONTINUE
4999f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
5009f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
5019f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Structure of the super block
5029f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
5039f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_super_block {
5049f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_inodes_count;		/* Inodes count */
5059f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_blocks_count;		/* Blocks count */
5069f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_r_blocks_count;	/* Reserved blocks count */
5079f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_free_blocks_count;	/* Free blocks count */
5089f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_free_inodes_count;	/* Free inodes count */
5099f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_first_data_block;	/* First Data Block */
5109f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_log_block_size;	/* Block size */
5119f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__s32	s_log_frag_size;	/* Fragment size */
5129f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_blocks_per_group;	/* # Blocks per group */
5139f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_frags_per_group;	/* # Fragments per group */
5149f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_inodes_per_group;	/* # Inodes per group */
5159f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_mtime;		/* Mount time */
5169f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_wtime;		/* Write time */
5179f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	s_mnt_count;		/* Mount count */
5189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__s16	s_max_mnt_count;	/* Maximal mount count */
5199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	s_magic;		/* Magic signature */
5209f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	s_state;		/* File system state */
5219f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	s_errors;		/* Behaviour when detecting errors */
5220fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u16	s_minor_rev_level;	/* minor revision level */
5239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_lastcheck;		/* time of last check */
5249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_checkinterval;	/* max. time between checks */
5259f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_creator_os;		/* OS */
5269f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_rev_level;		/* Revision level */
5279f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	s_def_resuid;		/* Default uid for reserved blocks */
5289f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	s_def_resgid;		/* Default gid for reserved blocks */
5299f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	/*
5309f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * These fields are for EXT2_DYNAMIC_REV superblocks only.
5319f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 *
5329f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * Note: the difference between the compatible feature set and
5339f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * the incompatible feature set is that if there is a bit set
5349f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * in the incompatible feature set that the kernel doesn't
5359f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * know about, it should refuse to mount the filesystem.
5360fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	 *
5379f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * e2fsck's requirements are more strict; if it doesn't know
5389f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * about a feature in either the compatible or incompatible
5399f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * feature set, it must abort and not try to meddle with
5409f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * things it doesn't understand...
5419f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 */
5420fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u32	s_first_ino;		/* First non-reserved inode */
5430fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u16   s_inode_size;		/* size of inode structure */
5440fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u16	s_block_group_nr;	/* block group # of this superblock */
5450fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u32	s_feature_compat;	/* compatible feature set */
5460fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u32	s_feature_incompat;	/* incompatible feature set */
5470fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	__u32	s_feature_ro_compat;	/* readonly-compatible feature set */
5489f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u8	s_uuid[16];		/* 128-bit uuid for volume */
5490fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	char	s_volume_name[16];	/* volume name */
5500fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	char	s_last_mounted[64];	/* directory where last mounted */
5519f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_algorithm_usage_bitmap; /* For compression */
5529f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	/*
5539f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * Performance hints.  Directory preallocation should only
5549f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
5559f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 */
5569f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u8	s_prealloc_blocks;	/* Nr of blocks to try to preallocate*/
5579f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u8	s_prealloc_dir_blocks;	/* Nr to preallocate for dirs */
5589e6c5dd73e7bc1a946b2b8b6c5a15c1f9d3534c0Theodore Ts'o	__u16	s_reserved_gdt_blocks;	/* Per group table for online growth */
5590fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger	/*
5609f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
5619f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	 */
5629f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u8	s_journal_uuid[16];	/* uuid of journal superblock */
5639f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_journal_inum;		/* inode number of journal file */
5649f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_journal_dev;		/* device number of journal file */
5659f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	s_last_orphan;		/* start of list of inodes to delete */
566b7a00563b22b0ea47ddc7117508c0b8e0d65df43Theodore Ts'o	__u32	s_hash_seed[4];		/* HTREE hash seed */
567b7a00563b22b0ea47ddc7117508c0b8e0d65df43Theodore Ts'o	__u8	s_def_hash_version;	/* Default hash version to use */
568a435ec3449694a8fa299337197cc09624960a3a6Theodore Ts'o	__u8	s_jnl_backup_type; 	/* Default type of journal backup */
5698061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u16	s_desc_size;		/* Group desc. size: INCOMPAT_64BIT */
570a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o	__u32	s_default_mount_opts;
571c046ac7f2e4c53e20cf1e909bbe511f91074b396Theodore Ts'o	__u32	s_first_meta_bg;	/* First metablock group */
5729d2aefb3bc0a48b1540d06e1983aa96c56d39e17Theodore Ts'o	__u32	s_mkfs_time;		/* When the filesystem was created */
5731ba7a2f2b6a9b152828a06443955a7fb1d139930Theodore Ts'o	__u32	s_jnl_blocks[17]; 	/* Backup of the journal inode */
5748061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	s_blocks_count_hi;	/* Blocks count high 32bits */
5758061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	s_r_blocks_count_hi;	/* Reserved blocks count high 32 bits*/
5768061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o	__u32	s_free_blocks_hi; 	/* Free blocks count */
5776b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u16	s_min_extra_isize;	/* All inodes have at least # bytes */
5786b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o	__u16	s_want_extra_isize; 	/* New inodes should reserve # bytes */
579f77704e416fca7dbe4cc91abba674d2ae3c14f6fTheodore Ts'o	__u32	s_flags;		/* Miscellaneous flags */
58096c6a3acd377698cb99ffd9925bec9b20ca4f6f9Theodore Ts'o	__u16   s_raid_stride;		/* RAID stride */
581b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u16   s_mmp_interval;         /* # seconds to wait in MMP checking */
582b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u64   s_mmp_block;            /* Block for multi-mount protection */
583decb2a5b3a1e346ddb725a3ba01b759d8c9ee4e6Theodore Ts'o	__u32   s_raid_stripe_width;    /* blocks on all data disks (N*stride)*/
584decb2a5b3a1e346ddb725a3ba01b759d8c9ee4e6Theodore Ts'o	__u32   s_reserved[163];        /* Padding to the end of the block */
5859f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
5869f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
5879f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
5889f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Codes for operating systems
5899f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
5909f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_OS_LINUX		0
5919f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_OS_HURD		1
5929f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_OS_MASIX		2
5939f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_OS_FREEBSD		3
5949f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_OS_LITES		4
5959f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
5969f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
5979f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Revision levels
5989f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
5999f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_GOOD_OLD_REV	0	/* The good old (original) format */
6000fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_DYNAMIC_REV	1	/* V2 format w/ dynamic inode sizes */
6019f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6029f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_CURRENT_REV	EXT2_GOOD_OLD_REV
6039f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_MAX_SUPP_REV	EXT2_DYNAMIC_REV
6049f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6059f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_GOOD_OLD_INODE_SIZE 128
6069f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6079f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
608a435ec3449694a8fa299337197cc09624960a3a6Theodore Ts'o * Journal inode backup types
609a435ec3449694a8fa299337197cc09624960a3a6Theodore Ts'o */
610a435ec3449694a8fa299337197cc09624960a3a6Theodore Ts'o#define EXT3_JNL_BACKUP_BLOCKS	1
611a435ec3449694a8fa299337197cc09624960a3a6Theodore Ts'o
612a435ec3449694a8fa299337197cc09624960a3a6Theodore Ts'o/*
6139f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Feature set definitions
6149f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
6159f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6169f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_HAS_COMPAT_FEATURE(sb,mask)			\
6179f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	( EXT2_SB(sb)->s_feature_compat & (mask) )
6189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask)			\
6199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
6209f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask)			\
6219f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	( EXT2_SB(sb)->s_feature_incompat & (mask) )
6229f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_COMPAT_DIR_PREALLOC	0x0001
6249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_COMPAT_IMAGIC_INODES	0x0002
6259f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT3_FEATURE_COMPAT_HAS_JOURNAL		0x0004
626b10820cdcd5f007894b81cf716cf1fdd8523bbcaTheodore Ts'o#define EXT2_FEATURE_COMPAT_EXT_ATTR		0x0008
6279f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_COMPAT_RESIZE_INODE	0x0010
628b10820cdcd5f007894b81cf716cf1fdd8523bbcaTheodore Ts'o#define EXT2_FEATURE_COMPAT_DIR_INDEX		0x0020
629f5fa20078bfc05b554294fe9c5505375d7913e8cTheodore Ts'o#define EXT2_FEATURE_COMPAT_LAZY_BG		0x0040
6309f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6319f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER	0x0001
6329f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
6332c93113e6ac1384abd1935af7217b783fdcb3023Theodore Ts'o/* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR	0x0004 not used */
6345d17119d14fe1276936c85d7986695a4543b1aa1Theodore Ts'o#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE	0x0008
6358815fb8a00f5a441eb62f035353db9e0cca90b38Theodore Ts'o#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
636bec6f49a46ec78a4c5928a22214848a7ea654704Theodore Ts'o#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
6376b3ce9871c3424d0b41e0c7227ddc116d2e0de1aTheodore Ts'o#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE	0x0040
6389f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6399f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_INCOMPAT_COMPRESSION	0x0001
6409f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_INCOMPAT_FILETYPE		0x0002
6419f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
6429f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
643c046ac7f2e4c53e20cf1e909bbe511f91074b396Theodore Ts'o#define EXT2_FEATURE_INCOMPAT_META_BG		0x0010
64439dc1c45cb41ce37a56d364103bb852d0b62c835Theodore Ts'o#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040
6458061d2c144bf22ce3e170e40a194932da4baf8fbTheodore Ts'o#define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
646b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger#define EXT4_FEATURE_INCOMPAT_MMP		0x0100
64739dc1c45cb41ce37a56d364103bb852d0b62c835Theodore Ts'o
6489f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6499f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_COMPAT_SUPP	0
650c046ac7f2e4c53e20cf1e909bbe511f91074b396Theodore Ts'o#define EXT2_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE)
6519f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
6529f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
6539f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o					 EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
6549f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6559f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
6569f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Default values for user and/or group using reserved blocks
6579f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
6580fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_DEF_RESUID		0
6590fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_DEF_RESGID		0
6609f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6619f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
662a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o * Default mount options
663a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o */
664a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o#define EXT2_DEFM_DEBUG		0x0001
665a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o#define EXT2_DEFM_BSDGROUPS	0x0002
666a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o#define EXT2_DEFM_XATTR_USER	0x0004
667a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o#define EXT2_DEFM_ACL		0x0008
668a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o#define EXT2_DEFM_UID16		0x0010
6694a959fe6f18a3b6023234a66f4455f7ec660b8b4Theodore Ts'o#define EXT3_DEFM_JMODE		0x0060
6704a959fe6f18a3b6023234a66f4455f7ec660b8b4Theodore Ts'o#define EXT3_DEFM_JMODE_DATA	0x0020
6714a959fe6f18a3b6023234a66f4455f7ec660b8b4Theodore Ts'o#define EXT3_DEFM_JMODE_ORDERED	0x0040
6724a959fe6f18a3b6023234a66f4455f7ec660b8b4Theodore Ts'o#define EXT3_DEFM_JMODE_WBACK	0x0060
673a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o
674a0c3fd5e4cdc2e0b032c9ace89d960a622069c32Theodore Ts'o/*
6759f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Structure of a directory entry
6769f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
6779f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_NAME_LEN 255
6789f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6799f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_dir_entry {
6809f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	inode;			/* Inode number */
6819f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	rec_len;		/* Directory entry length */
6829f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	name_len;		/* Name length */
6839f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	char	name[EXT2_NAME_LEN];	/* File name */
6849f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
6859f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
6869f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
6879f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * The new version of the directory entry.  Since EXT2 structures are
6889f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * stored in intel byte order, and the name_len field could never be
6899f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * bigger than 255 chars, it's safe to reclaim the extra byte for the
6909f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * file_type field.
6919f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
6929f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'ostruct ext2_dir_entry_2 {
6939f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u32	inode;			/* Inode number */
6949f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u16	rec_len;		/* Directory entry length */
6959f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u8	name_len;		/* Name length */
6969f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	__u8	file_type;
6979f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o	char	name[EXT2_NAME_LEN];	/* File name */
6989f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o};
6999f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
7009f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
7019f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * Ext2 directory file types.  Only the low 3 bits are used.  The
7029f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * other bits are reserved for now.
7039f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
7049f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_UNKNOWN		0
7059f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_REG_FILE	1
7069f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_DIR		2
7079f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_CHRDEV		3
7080fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_FT_BLKDEV		4
7099f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_FIFO		5
7109f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_SOCK		6
7119f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_SYMLINK		7
7129f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
7139f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_FT_MAX		8
7149f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
7159f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o/*
7169f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * EXT2_DIR_PAD defines the directory entries boundaries
7179f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o *
7189f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o * NOTE: It must be a multiple of 4
7199f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o */
7200fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_DIR_PAD			4
7210fbd1a8a9a2ef697927f886559344ffa1bb2eefaAndreas Dilger#define EXT2_DIR_ROUND			(EXT2_DIR_PAD - 1)
7229f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#define EXT2_DIR_REC_LEN(name_len)	(((name_len) + 8 + EXT2_DIR_ROUND) & \
7239f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o					 ~EXT2_DIR_ROUND)
7249f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o
725b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger/*
726b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger * This structure will be used for multiple mount protection. It will be
727b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger * written into the block number saved in the s_mmp_block field in the
728b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger * superblock.
729b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger */
730b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger#define	EXT2_MMP_MAGIC    0x004D4D50 /* ASCII for MMP */
731b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger#define	EXT2_MMP_CLEAN    0xFF4D4D50 /* Value of mmp_seq for clean unmount */
732b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger#define	EXT2_MMP_FSCK_ON  0xE24D4D50 /* Value of mmp_seq when being fscked */
733b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger
734b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilgerstruct mmp_struct {
735b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u32	mmp_magic;
736b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u32	mmp_seq;
737b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u64	mmp_time;
738b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	char	mmp_nodename[64];
739b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	char	mmp_bdevname[32];
740b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u16	mmp_interval;
741b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u16	mmp_pad1;
742b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger	__u32	mmp_pad2;
743b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger};
744b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger
745b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger/*
746b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger * Interval in number of seconds to update the MMP sequence number.
747b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger */
748b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger#define EXT2_MMP_DEF_INTERVAL	5
749b62e88af6a1be97b224a3e5c1fea43fa173567eaAndreas Dilger
7509f8046fc6dfc13eee2f5c363214e60b533872cacTheodore Ts'o#endif	/* _LINUX_EXT2_FS_H */
751