ext4: Add second mount options field since the s_mount_opt is full up

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o 2010-12-15 20:30:48 -05:00
Родитель 673c610033
Коммит a2595b8aa6
2 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -908,6 +908,13 @@ struct ext4_inode_info {
#define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \ #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \
EXT4_MOUNT_##opt) EXT4_MOUNT_##opt)
#define clear_opt2(sb, opt) EXT4_SB(sb)->s_mount_opt2 &= \
~EXT4_MOUNT2_##opt
#define set_opt2(sb, opt) EXT4_SB(sb)->s_mount_opt2 |= \
EXT4_MOUNT2_##opt
#define test_opt2(sb, opt) (EXT4_SB(sb)->s_mount_opt2 & \
EXT4_MOUNT2_##opt)
#define ext4_set_bit ext2_set_bit #define ext4_set_bit ext2_set_bit
#define ext4_set_bit_atomic ext2_set_bit_atomic #define ext4_set_bit_atomic ext2_set_bit_atomic
#define ext4_clear_bit ext2_clear_bit #define ext4_clear_bit ext2_clear_bit
@ -1073,6 +1080,7 @@ struct ext4_sb_info {
struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */ struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */
struct buffer_head **s_group_desc; struct buffer_head **s_group_desc;
unsigned int s_mount_opt; unsigned int s_mount_opt;
unsigned int s_mount_opt2;
unsigned int s_mount_flags; unsigned int s_mount_flags;
ext4_fsblk_t s_sb_block; ext4_fsblk_t s_sb_block;
uid_t s_resuid; uid_t s_resuid;

Просмотреть файл

@ -1895,12 +1895,12 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
ext4_commit_super(sb, 1); ext4_commit_super(sb, 1);
if (test_opt(sb, DEBUG)) if (test_opt(sb, DEBUG))
printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, " printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
"bpg=%lu, ipg=%lu, mo=%04x]\n", "bpg=%lu, ipg=%lu, mo=%04x, mo2=%04x]\n",
sb->s_blocksize, sb->s_blocksize,
sbi->s_groups_count, sbi->s_groups_count,
EXT4_BLOCKS_PER_GROUP(sb), EXT4_BLOCKS_PER_GROUP(sb),
EXT4_INODES_PER_GROUP(sb), EXT4_INODES_PER_GROUP(sb),
sbi->s_mount_opt); sbi->s_mount_opt, sbi->s_mount_opt2);
return res; return res;
} }
@ -4171,6 +4171,7 @@ static int ext4_unfreeze(struct super_block *sb)
*/ */
struct ext4_mount_options { struct ext4_mount_options {
unsigned long s_mount_opt; unsigned long s_mount_opt;
unsigned long s_mount_opt2;
uid_t s_resuid; uid_t s_resuid;
gid_t s_resgid; gid_t s_resgid;
unsigned long s_commit_interval; unsigned long s_commit_interval;
@ -4201,6 +4202,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
lock_super(sb); lock_super(sb);
old_sb_flags = sb->s_flags; old_sb_flags = sb->s_flags;
old_opts.s_mount_opt = sbi->s_mount_opt; old_opts.s_mount_opt = sbi->s_mount_opt;
old_opts.s_mount_opt2 = sbi->s_mount_opt2;
old_opts.s_resuid = sbi->s_resuid; old_opts.s_resuid = sbi->s_resuid;
old_opts.s_resgid = sbi->s_resgid; old_opts.s_resgid = sbi->s_resgid;
old_opts.s_commit_interval = sbi->s_commit_interval; 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)
restore_opts: restore_opts:
sb->s_flags = old_sb_flags; sb->s_flags = old_sb_flags;
sbi->s_mount_opt = old_opts.s_mount_opt; sbi->s_mount_opt = old_opts.s_mount_opt;
sbi->s_mount_opt2 = old_opts.s_mount_opt2;
sbi->s_resuid = old_opts.s_resuid; sbi->s_resuid = old_opts.s_resuid;
sbi->s_resgid = old_opts.s_resgid; sbi->s_resgid = old_opts.s_resgid;
sbi->s_commit_interval = old_opts.s_commit_interval; sbi->s_commit_interval = old_opts.s_commit_interval;