diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-02-20 17:53:04 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-02-20 17:53:04 -0500 |
commit | 661aa520577046192e50467b28c9c5726a8a9fb1 (patch) | |
tree | 865c7a6da7d31fa50314c0faf02034997c4f40cd | |
parent | 43e625d84fa7daca0ad46f1dbc965b04fd204afe (diff) |
ext4: remove the resize mount option
The resize mount option seems to be of limited value,
especially in the age of online resize2fs. Nuke it.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | Documentation/filesystems/ext4.txt | 5 | ||||
-rw-r--r-- | fs/ext4/super.c | 29 |
2 files changed, 6 insertions, 28 deletions
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 09d5f32ea156..990219c58b1a 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -353,11 +353,6 @@ nouid32 Disables 32-bit UIDs and GIDs. This is for | |||
353 | interoperability with older kernels which only | 353 | interoperability with older kernels which only |
354 | store and expect 16-bit values. | 354 | store and expect 16-bit values. |
355 | 355 | ||
356 | resize Allows to resize filesystem to the end of the last | ||
357 | existing block group, further resize has to be done | ||
358 | with resize2fs either online, or offline. It can be | ||
359 | used only with conjunction with remount. | ||
360 | |||
361 | block_validity This options allows to enables/disables the in-kernel | 356 | block_validity This options allows to enables/disables the in-kernel |
362 | noblock_validity facility for tracking filesystem metadata blocks | 357 | noblock_validity facility for tracking filesystem metadata blocks |
363 | within internal data structures. This allows multi- | 358 | within internal data structures. This allows multi- |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 9420c50c5c6a..deb6eb35ff3d 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1342,7 +1342,7 @@ enum { | |||
1342 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, | 1342 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, |
1343 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota, | 1343 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota, |
1344 | Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err, | 1344 | Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err, |
1345 | Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version, | 1345 | Opt_usrquota, Opt_grpquota, Opt_i_version, |
1346 | Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit, | 1346 | Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit, |
1347 | Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity, | 1347 | Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity, |
1348 | Opt_inode_readahead_blks, Opt_journal_ioprio, | 1348 | Opt_inode_readahead_blks, Opt_journal_ioprio, |
@@ -1403,7 +1403,6 @@ static const match_table_t tokens = { | |||
1403 | {Opt_nobarrier, "nobarrier"}, | 1403 | {Opt_nobarrier, "nobarrier"}, |
1404 | {Opt_i_version, "i_version"}, | 1404 | {Opt_i_version, "i_version"}, |
1405 | {Opt_stripe, "stripe=%u"}, | 1405 | {Opt_stripe, "stripe=%u"}, |
1406 | {Opt_resize, "resize"}, | ||
1407 | {Opt_delalloc, "delalloc"}, | 1406 | {Opt_delalloc, "delalloc"}, |
1408 | {Opt_nodelalloc, "nodelalloc"}, | 1407 | {Opt_nodelalloc, "nodelalloc"}, |
1409 | {Opt_mblk_io_submit, "mblk_io_submit"}, | 1408 | {Opt_mblk_io_submit, "mblk_io_submit"}, |
@@ -1513,7 +1512,7 @@ static int clear_qf_name(struct super_block *sb, int qtype) | |||
1513 | static int parse_options(char *options, struct super_block *sb, | 1512 | static int parse_options(char *options, struct super_block *sb, |
1514 | unsigned long *journal_devnum, | 1513 | unsigned long *journal_devnum, |
1515 | unsigned int *journal_ioprio, | 1514 | unsigned int *journal_ioprio, |
1516 | ext4_fsblk_t *n_blocks_count, int is_remount) | 1515 | int is_remount) |
1517 | { | 1516 | { |
1518 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 1517 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
1519 | char *p; | 1518 | char *p; |
@@ -1794,17 +1793,6 @@ set_qf_format: | |||
1794 | break; | 1793 | break; |
1795 | case Opt_ignore: | 1794 | case Opt_ignore: |
1796 | break; | 1795 | break; |
1797 | case Opt_resize: | ||
1798 | if (!is_remount) { | ||
1799 | ext4_msg(sb, KERN_ERR, | ||
1800 | "resize option only available " | ||
1801 | "for remount"); | ||
1802 | return 0; | ||
1803 | } | ||
1804 | if (match_int(&args[0], &option) != 0) | ||
1805 | return 0; | ||
1806 | *n_blocks_count = option; | ||
1807 | break; | ||
1808 | case Opt_nobh: | 1796 | case Opt_nobh: |
1809 | ext4_msg(sb, KERN_WARNING, | 1797 | ext4_msg(sb, KERN_WARNING, |
1810 | "Ignoring deprecated nobh option"); | 1798 | "Ignoring deprecated nobh option"); |
@@ -3241,13 +3229,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3241 | sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT; | 3229 | sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT; |
3242 | 3230 | ||
3243 | if (!parse_options((char *) sbi->s_es->s_mount_opts, sb, | 3231 | if (!parse_options((char *) sbi->s_es->s_mount_opts, sb, |
3244 | &journal_devnum, &journal_ioprio, NULL, 0)) { | 3232 | &journal_devnum, &journal_ioprio, 0)) { |
3245 | ext4_msg(sb, KERN_WARNING, | 3233 | ext4_msg(sb, KERN_WARNING, |
3246 | "failed to parse options in superblock: %s", | 3234 | "failed to parse options in superblock: %s", |
3247 | sbi->s_es->s_mount_opts); | 3235 | sbi->s_es->s_mount_opts); |
3248 | } | 3236 | } |
3249 | if (!parse_options((char *) data, sb, &journal_devnum, | 3237 | if (!parse_options((char *) data, sb, &journal_devnum, |
3250 | &journal_ioprio, NULL, 0)) | 3238 | &journal_ioprio, 0)) |
3251 | goto failed_mount; | 3239 | goto failed_mount; |
3252 | 3240 | ||
3253 | if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { | 3241 | if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { |
@@ -4380,7 +4368,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
4380 | { | 4368 | { |
4381 | struct ext4_super_block *es; | 4369 | struct ext4_super_block *es; |
4382 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 4370 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
4383 | ext4_fsblk_t n_blocks_count = 0; | ||
4384 | unsigned long old_sb_flags; | 4371 | unsigned long old_sb_flags; |
4385 | struct ext4_mount_options old_opts; | 4372 | struct ext4_mount_options old_opts; |
4386 | int enable_quota = 0; | 4373 | int enable_quota = 0; |
@@ -4413,8 +4400,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
4413 | /* | 4400 | /* |
4414 | * Allow the "check" option to be passed as a remount option. | 4401 | * Allow the "check" option to be passed as a remount option. |
4415 | */ | 4402 | */ |
4416 | if (!parse_options(data, sb, NULL, &journal_ioprio, | 4403 | if (!parse_options(data, sb, NULL, &journal_ioprio, 1)) { |
4417 | &n_blocks_count, 1)) { | ||
4418 | err = -EINVAL; | 4404 | err = -EINVAL; |
4419 | goto restore_opts; | 4405 | goto restore_opts; |
4420 | } | 4406 | } |
@@ -4432,8 +4418,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
4432 | set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); | 4418 | set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); |
4433 | } | 4419 | } |
4434 | 4420 | ||
4435 | if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) || | 4421 | if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { |
4436 | n_blocks_count > ext4_blocks_count(es)) { | ||
4437 | if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { | 4422 | if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { |
4438 | err = -EROFS; | 4423 | err = -EROFS; |
4439 | goto restore_opts; | 4424 | goto restore_opts; |
@@ -4508,8 +4493,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
4508 | if (sbi->s_journal) | 4493 | if (sbi->s_journal) |
4509 | ext4_clear_journal_err(sb, es); | 4494 | ext4_clear_journal_err(sb, es); |
4510 | sbi->s_mount_state = le16_to_cpu(es->s_state); | 4495 | sbi->s_mount_state = le16_to_cpu(es->s_state); |
4511 | if ((err = ext4_group_extend(sb, es, n_blocks_count))) | ||
4512 | goto restore_opts; | ||
4513 | if (!ext4_setup_super(sb, es, 0)) | 4496 | if (!ext4_setup_super(sb, es, 0)) |
4514 | sb->s_flags &= ~MS_RDONLY; | 4497 | sb->s_flags &= ~MS_RDONLY; |
4515 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, | 4498 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, |