From 8b67f04ab9de5d8f3a71aef72bf02c995a506db5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 1 Aug 2010 23:14:20 -0400 Subject: ext4: Add mount options in superblock Allow mount options to be stored in the superblock. Also add default mount option bits for nobarrier, block_validity, discard, and nodelalloc. Signed-off-by: "Theodore Ts'o" --- fs/ext4/ext4.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'fs/ext4/ext4.h') diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 9ca3637eca5f..ed14e1db0832 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1025,8 +1025,9 @@ struct ext4_super_block { __le32 s_last_error_line; /* line number where error happened */ __le64 s_last_error_block; /* block involved of last error */ __u8 s_last_error_func[32]; /* function where the error happened */ -#define EXT4_S_ERR_END offsetof(struct ext4_super_block, s_reserved) - __le32 s_reserved[128]; /* Padding to the end of the block */ +#define EXT4_S_ERR_END offsetof(struct ext4_super_block, s_mount_opts) + __u8 s_mount_opts[64]; + __le32 s_reserved[112]; /* Padding to the end of the block */ }; #define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START) @@ -1341,6 +1342,10 @@ EXT4_INODE_BIT_FNS(state, state_flags) #define EXT4_DEFM_JMODE_DATA 0x0020 #define EXT4_DEFM_JMODE_ORDERED 0x0040 #define EXT4_DEFM_JMODE_WBACK 0x0060 +#define EXT4_DEFM_NOBARRIER 0x0100 +#define EXT4_DEFM_BLOCK_VALIDITY 0x0200 +#define EXT4_DEFM_DISCARD 0x0400 +#define EXT4_DEFM_NODELALLOC 0x0800 /* * Default journal batch times -- cgit v1.2.3