aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/ext4.h8
-rw-r--r--fs/ext4/super.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index ddae3c435138..17baecbf8cda 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -908,6 +908,13 @@ struct ext4_inode_info {
908#define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \ 908#define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \
909 EXT4_MOUNT_##opt) 909 EXT4_MOUNT_##opt)
910 910
911#define clear_opt2(sb, opt) EXT4_SB(sb)->s_mount_opt2 &= \
912 ~EXT4_MOUNT2_##opt
913#define set_opt2(sb, opt) EXT4_SB(sb)->s_mount_opt2 |= \
914 EXT4_MOUNT2_##opt
915#define test_opt2(sb, opt) (EXT4_SB(sb)->s_mount_opt2 & \
916 EXT4_MOUNT2_##opt)
917
911#define ext4_set_bit ext2_set_bit 918#define ext4_set_bit ext2_set_bit
912#define ext4_set_bit_atomic ext2_set_bit_atomic 919#define ext4_set_bit_atomic ext2_set_bit_atomic
913#define ext4_clear_bit ext2_clear_bit 920#define ext4_clear_bit ext2_clear_bit
@@ -1073,6 +1080,7 @@ struct ext4_sb_info {
1073 struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */ 1080 struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */
1074 struct buffer_head **s_group_desc; 1081 struct buffer_head **s_group_desc;
1075 unsigned int s_mount_opt; 1082 unsigned int s_mount_opt;
1083 unsigned int s_mount_opt2;
1076 unsigned int s_mount_flags; 1084 unsigned int s_mount_flags;
1077 ext4_fsblk_t s_sb_block; 1085 ext4_fsblk_t s_sb_block;
1078 uid_t s_resuid; 1086 uid_t s_resuid;
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7aa3a790363a..072ff973ff2b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1895,12 +1895,12 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
1895 ext4_commit_super(sb, 1); 1895 ext4_commit_super(sb, 1);
1896 if (test_opt(sb, DEBUG)) 1896 if (test_opt(sb, DEBUG))
1897 printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, " 1897 printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
1898 "bpg=%lu, ipg=%lu, mo=%04x]\n", 1898 "bpg=%lu, ipg=%lu, mo=%04x, mo2=%04x]\n",
1899 sb->s_blocksize, 1899 sb->s_blocksize,
1900 sbi->s_groups_count, 1900 sbi->s_groups_count,
1901 EXT4_BLOCKS_PER_GROUP(sb), 1901 EXT4_BLOCKS_PER_GROUP(sb),
1902 EXT4_INODES_PER_GROUP(sb), 1902 EXT4_INODES_PER_GROUP(sb),
1903 sbi->s_mount_opt); 1903 sbi->s_mount_opt, sbi->s_mount_opt2);
1904 1904
1905 return res; 1905 return res;
1906} 1906}
@@ -4171,6 +4171,7 @@ static int ext4_unfreeze(struct super_block *sb)
4171 */ 4171 */
4172struct ext4_mount_options { 4172struct ext4_mount_options {
4173 unsigned long s_mount_opt; 4173 unsigned long s_mount_opt;
4174 unsigned long s_mount_opt2;
4174 uid_t s_resuid; 4175 uid_t s_resuid;
4175 gid_t s_resgid; 4176 gid_t s_resgid;
4176 unsigned long s_commit_interval; 4177 unsigned long s_commit_interval;
@@ -4201,6 +4202,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
4201 lock_super(sb); 4202 lock_super(sb);
4202 old_sb_flags = sb->s_flags; 4203 old_sb_flags = sb->s_flags;
4203 old_opts.s_mount_opt = sbi->s_mount_opt; 4204 old_opts.s_mount_opt = sbi->s_mount_opt;
4205 old_opts.s_mount_opt2 = sbi->s_mount_opt2;
4204 old_opts.s_resuid = sbi->s_resuid; 4206 old_opts.s_resuid = sbi->s_resuid;
4205 old_opts.s_resgid = sbi->s_resgid; 4207 old_opts.s_resgid = sbi->s_resgid;
4206 old_opts.s_commit_interval = sbi->s_commit_interval; 4208 old_opts.s_commit_interval = sbi->s_commit_interval;
@@ -4354,6 +4356,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
4354restore_opts: 4356restore_opts:
4355 sb->s_flags = old_sb_flags; 4357 sb->s_flags = old_sb_flags;
4356 sbi->s_mount_opt = old_opts.s_mount_opt; 4358 sbi->s_mount_opt = old_opts.s_mount_opt;
4359 sbi->s_mount_opt2 = old_opts.s_mount_opt2;
4357 sbi->s_resuid = old_opts.s_resuid; 4360 sbi->s_resuid = old_opts.s_resuid;
4358 sbi->s_resgid = old_opts.s_resgid; 4361 sbi->s_resgid = old_opts.s_resgid;
4359 sbi->s_commit_interval = old_opts.s_commit_interval; 4362 sbi->s_commit_interval = old_opts.s_commit_interval;