All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ext4: remove a couple mount options
@ 2011-11-02 16:32 Eric Sandeen
  2011-11-02 16:33 ` [PATCH 1/2] ext4: remove a the journal=update mount option Eric Sandeen
  2011-11-02 16:36 ` [PATCH 2/2] ext4: remove a couple mount options Eric Sandeen
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Sandeen @ 2011-11-02 16:32 UTC (permalink / raw)
  To: ext4 development

I think that the journal=update and resize mount options are a
bit pointless these days, so here are patches to remove them.

I'm not adamant about it, but thought I'd put it out there
as a proposal, after looking at our long list of mount options
and the testing requirements for it.

-Eric

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ext4: remove a the journal=update mount option
  2011-11-02 16:32 [PATCH 0/2] ext4: remove a couple mount options Eric Sandeen
@ 2011-11-02 16:33 ` Eric Sandeen
  2012-02-13 22:41   ` Ted Ts'o
  2011-11-02 16:36 ` [PATCH 2/2] ext4: remove a couple mount options Eric Sandeen
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2011-11-02 16:33 UTC (permalink / raw)
  To: ext4 development

The V2 journal format was introduced around ten years ago,
for ext3. It seems highly unlikely that anyone will need this
migration option for ext4.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 Documentation/filesystems/ext4.txt |    3 -
 fs/ext4/super.c                    |   26 ----------------
 fs/jbd2/journal.c                  |   57 -------------------------------------
 3 files changed, 1 insertion(+), 85 deletions(-)


diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 232a575..f19cecc 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -144,9 +144,6 @@ journal_async_commit	Commit block can be written to disk without waiting
 			mount the device. This will enable 'journal_checksum'
 			internally.
 
-journal=update		Update the ext4 file system's journal to the current
-			format.
-
 journal_dev=devnum	When the external journal device's major/minor numbers
 			have changed, this option allows the user to specify
 			the new journal location.  The journal device is
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 44d0c8d..6a5faac 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1306,8 +1306,7 @@ enum {
 	Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
 	Opt_auto_da_alloc, Opt_noauto_da_alloc, Opt_noload, Opt_nobh, Opt_bh,
 	Opt_commit, Opt_min_batch_time, Opt_max_batch_time,
-	Opt_journal_update, Opt_journal_dev,
-	Opt_journal_checksum, Opt_journal_async_commit,
+	Opt_journal_dev, Opt_journal_checksum, Opt_journal_async_commit,
 	Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
 	Opt_data_err_abort, Opt_data_err_ignore,
 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
@@ -1350,7 +1349,6 @@ static const match_table_t tokens = {
 	{Opt_commit, "commit=%u"},
 	{Opt_min_batch_time, "min_batch_time=%u"},
 	{Opt_max_batch_time, "max_batch_time=%u"},
-	{Opt_journal_update, "journal=update"},
 	{Opt_journal_dev, "journal_dev=%u"},
 	{Opt_journal_checksum, "journal_checksum"},
 	{Opt_journal_async_commit, "journal_async_commit"},
@@ -1598,19 +1596,6 @@ static int parse_options(char *options, struct super_block *sb,
 			ext4_msg(sb, KERN_ERR, "(no)acl options not supported");
 			break;
 #endif
-		case Opt_journal_update:
-			/* @@@ FIXME */
-			/* Eventually we will want to be able to create
-			   a journal file here.  For now, only allow the
-			   user to specify an existing inode to be the
-			   journal file. */
-			if (is_remount) {
-				ext4_msg(sb, KERN_ERR,
-					 "Cannot specify journal on remount");
-				return 0;
-			}
-			set_opt(sb, UPDATE_JOURNAL);
-			break;
 		case Opt_journal_dev:
 			if (is_remount) {
 				ext4_msg(sb, KERN_ERR,
@@ -4015,15 +4000,6 @@ static int ext4_load_journal(struct super_block *sb,
 	if (!(journal->j_flags & JBD2_BARRIER))
 		ext4_msg(sb, KERN_INFO, "barriers disabled");
 
-	if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) {
-		err = jbd2_journal_update_format(journal);
-		if (err)  {
-			ext4_msg(sb, KERN_ERR, "error updating journal");
-			jbd2_journal_destroy(journal);
-			return err;
-		}
-	}
-
 	if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER))
 		err = jbd2_journal_wipe(journal, !really_read_only);
 	if (!err) {
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index f24df13..bed893f 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -71,7 +71,6 @@ EXPORT_SYMBOL(jbd2_journal_revoke);
 
 EXPORT_SYMBOL(jbd2_journal_init_dev);
 EXPORT_SYMBOL(jbd2_journal_init_inode);
-EXPORT_SYMBOL(jbd2_journal_update_format);
 EXPORT_SYMBOL(jbd2_journal_check_used_features);
 EXPORT_SYMBOL(jbd2_journal_check_available_features);
 EXPORT_SYMBOL(jbd2_journal_set_features);
@@ -96,7 +95,6 @@ EXPORT_SYMBOL(jbd2_journal_release_jbd_inode);
 EXPORT_SYMBOL(jbd2_journal_begin_ordered_truncate);
 EXPORT_SYMBOL(jbd2_inode_cache);
 
-static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *);
 static void __journal_abort_soft (journal_t *journal, int errno);
 static int jbd2_journal_create_slab(size_t slab_size);
 
@@ -1542,61 +1540,6 @@ void jbd2_journal_clear_features(journal_t *journal, unsigned long compat,
 EXPORT_SYMBOL(jbd2_journal_clear_features);
 
 /**
- * int jbd2_journal_update_format () - Update on-disk journal structure.
- * @journal: Journal to act on.
- *
- * Given an initialised but unloaded journal struct, poke about in the
- * on-disk structure to update it to the most recent supported version.
- */
-int jbd2_journal_update_format (journal_t *journal)
-{
-	journal_superblock_t *sb;
-	int err;
-
-	err = journal_get_superblock(journal);
-	if (err)
-		return err;
-
-	sb = journal->j_superblock;
-
-	switch (be32_to_cpu(sb->s_header.h_blocktype)) {
-	case JBD2_SUPERBLOCK_V2:
-		return 0;
-	case JBD2_SUPERBLOCK_V1:
-		return journal_convert_superblock_v1(journal, sb);
-	default:
-		break;
-	}
-	return -EINVAL;
-}
-
-static int journal_convert_superblock_v1(journal_t *journal,
-					 journal_superblock_t *sb)
-{
-	int offset, blocksize;
-	struct buffer_head *bh;
-
-	printk(KERN_WARNING
-		"JBD: Converting superblock from version 1 to 2.\n");
-
-	/* Pre-initialise new fields to zero */
-	offset = ((char *) &(sb->s_feature_compat)) - ((char *) sb);
-	blocksize = be32_to_cpu(sb->s_blocksize);
-	memset(&sb->s_feature_compat, 0, blocksize-offset);
-
-	sb->s_nr_users = cpu_to_be32(1);
-	sb->s_header.h_blocktype = cpu_to_be32(JBD2_SUPERBLOCK_V2);
-	journal->j_format_version = 2;
-
-	bh = journal->j_sb_buffer;
-	BUFFER_TRACE(bh, "marking dirty");
-	mark_buffer_dirty(bh);
-	sync_dirty_buffer(bh);
-	return 0;
-}
-

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ext4: remove a couple mount options
  2011-11-02 16:32 [PATCH 0/2] ext4: remove a couple mount options Eric Sandeen
  2011-11-02 16:33 ` [PATCH 1/2] ext4: remove a the journal=update mount option Eric Sandeen
@ 2011-11-02 16:36 ` Eric Sandeen
  2011-11-02 16:36   ` [PATCH 2/2 V2] ext4: remove the resize mount option Eric Sandeen
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2011-11-02 16:36 UTC (permalink / raw)
  To: ext4 development

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>
---
 Documentation/filesystems/ext4.txt |    5 -----
 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 f19cecc..4ea728a 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -362,11 +362,6 @@ nouid32			Disables 32-bit UIDs and GIDs.  This is for
 			interoperability  with  older kernels which only
 			store and expect 16-bit values.
 
-resize			Allows to resize filesystem to the end of the last
-			existing block group, further resize has to be done
-			with resize2fs either online, or offline. It can be
-			used only with conjunction with remount.
-
 block_validity		This options allows to enables/disables the in-kernel
 noblock_validity	facility for tracking filesystem metadata blocks
 			within internal data structures. This allows multi-
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6a5faac..0f11e99 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1312,7 +1312,7 @@ enum {
 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
 	Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
-	Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
+	Opt_usrquota, Opt_grpquota, Opt_i_version,
 	Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit,
 	Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
 	Opt_inode_readahead_blks, Opt_journal_ioprio,
@@ -1374,7 +1374,6 @@ static const match_table_t tokens = {
 	{Opt_nobarrier, "nobarrier"},
 	{Opt_i_version, "i_version"},
 	{Opt_stripe, "stripe=%u"},
-	{Opt_resize, "resize"},
 	{Opt_delalloc, "delalloc"},
 	{Opt_nodelalloc, "nodelalloc"},
 	{Opt_mblk_io_submit, "mblk_io_submit"},
@@ -1484,7 +1483,7 @@ static int clear_qf_name(struct super_block *sb, int qtype)
 static int parse_options(char *options, struct super_block *sb,
 			 unsigned long *journal_devnum,
 			 unsigned int *journal_ioprio,
-			 ext4_fsblk_t *n_blocks_count, int is_remount)
+			 int is_remount)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	char *p;
@@ -1761,17 +1760,6 @@ set_qf_format:
 			break;
 		case Opt_ignore:
 			break;
-		case Opt_resize:
-			if (!is_remount) {
-				ext4_msg(sb, KERN_ERR,
-					"resize option only available "
-					"for remount");
-				return 0;
-			}
-			if (match_int(&args[0], &option) != 0)
-				return 0;
-			*n_blocks_count = option;
-			break;
 		case Opt_nobh:
 			ext4_msg(sb, KERN_WARNING,
 				 "Ignoring deprecated nobh option");
@@ -3200,13 +3188,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT;
 
 	if (!parse_options((char *) sbi->s_es->s_mount_opts, sb,
-			   &journal_devnum, &journal_ioprio, NULL, 0)) {
+			   &journal_devnum, &journal_ioprio, 0)) {
 		ext4_msg(sb, KERN_WARNING,
 			 "failed to parse options in superblock: %s",
 			 sbi->s_es->s_mount_opts);
 	}
 	if (!parse_options((char *) data, sb, &journal_devnum,
-			   &journal_ioprio, NULL, 0))
+			   &journal_ioprio, 0))
 		goto failed_mount;
 
 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
@@ -4285,7 +4273,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 {
 	struct ext4_super_block *es;
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
-	ext4_fsblk_t n_blocks_count = 0;
 	unsigned long old_sb_flags;
 	struct ext4_mount_options old_opts;
 	int enable_quota = 0;
@@ -4318,8 +4305,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 	/*
 	 * Allow the "check" option to be passed as a remount option.
 	 */
-	if (!parse_options(data, sb, NULL, &journal_ioprio,
-			   &n_blocks_count, 1)) {
+	if (!parse_options(data, sb, NULL, &journal_ioprio, 1)) {
 		err = -EINVAL;
 		goto restore_opts;
 	}
@@ -4337,8 +4323,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 		set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
 	}
 
-	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) ||
-		n_blocks_count > ext4_blocks_count(es)) {
+	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
 		if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
 			err = -EROFS;
 			goto restore_opts;
@@ -4413,8 +4398,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 			if (sbi->s_journal)
 				ext4_clear_journal_err(sb, es);
 			sbi->s_mount_state = le16_to_cpu(es->s_state);
-			if ((err = ext4_group_extend(sb, es, n_blocks_count)))
-				goto restore_opts;
 			if (!ext4_setup_super(sb, es, 0))
 				sb->s_flags &= ~MS_RDONLY;
 			if (EXT4_HAS_INCOMPAT_FEATURE(sb,


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2 V2] ext4: remove the resize mount option
  2011-11-02 16:36 ` [PATCH 2/2] ext4: remove a couple mount options Eric Sandeen
@ 2011-11-02 16:36   ` Eric Sandeen
  2011-11-02 17:41     ` Andreas Dilger
  2012-02-13 22:44     ` Ted Ts'o
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Sandeen @ 2011-11-02 16:36 UTC (permalink / raw)
  To: ext4 development

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>
---
V2: get the subject right.

 Documentation/filesystems/ext4.txt |    5 -----
 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 f19cecc..4ea728a 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -362,11 +362,6 @@ nouid32			Disables 32-bit UIDs and GIDs.  This is for
 			interoperability  with  older kernels which only
 			store and expect 16-bit values.
 
-resize			Allows to resize filesystem to the end of the last
-			existing block group, further resize has to be done
-			with resize2fs either online, or offline. It can be
-			used only with conjunction with remount.
-
 block_validity		This options allows to enables/disables the in-kernel
 noblock_validity	facility for tracking filesystem metadata blocks
 			within internal data structures. This allows multi-
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6a5faac..0f11e99 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1312,7 +1312,7 @@ enum {
 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
 	Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
-	Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
+	Opt_usrquota, Opt_grpquota, Opt_i_version,
 	Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit,
 	Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
 	Opt_inode_readahead_blks, Opt_journal_ioprio,
@@ -1374,7 +1374,6 @@ static const match_table_t tokens = {
 	{Opt_nobarrier, "nobarrier"},
 	{Opt_i_version, "i_version"},
 	{Opt_stripe, "stripe=%u"},
-	{Opt_resize, "resize"},
 	{Opt_delalloc, "delalloc"},
 	{Opt_nodelalloc, "nodelalloc"},
 	{Opt_mblk_io_submit, "mblk_io_submit"},
@@ -1484,7 +1483,7 @@ static int clear_qf_name(struct super_block *sb, int qtype)
 static int parse_options(char *options, struct super_block *sb,
 			 unsigned long *journal_devnum,
 			 unsigned int *journal_ioprio,
-			 ext4_fsblk_t *n_blocks_count, int is_remount)
+			 int is_remount)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	char *p;
@@ -1761,17 +1760,6 @@ set_qf_format:
 			break;
 		case Opt_ignore:
 			break;
-		case Opt_resize:
-			if (!is_remount) {
-				ext4_msg(sb, KERN_ERR,
-					"resize option only available "
-					"for remount");
-				return 0;
-			}
-			if (match_int(&args[0], &option) != 0)
-				return 0;
-			*n_blocks_count = option;
-			break;
 		case Opt_nobh:
 			ext4_msg(sb, KERN_WARNING,
 				 "Ignoring deprecated nobh option");
@@ -3200,13 +3188,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT;
 
 	if (!parse_options((char *) sbi->s_es->s_mount_opts, sb,
-			   &journal_devnum, &journal_ioprio, NULL, 0)) {
+			   &journal_devnum, &journal_ioprio, 0)) {
 		ext4_msg(sb, KERN_WARNING,
 			 "failed to parse options in superblock: %s",
 			 sbi->s_es->s_mount_opts);
 	}
 	if (!parse_options((char *) data, sb, &journal_devnum,
-			   &journal_ioprio, NULL, 0))
+			   &journal_ioprio, 0))
 		goto failed_mount;
 
 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
@@ -4285,7 +4273,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 {
 	struct ext4_super_block *es;
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
-	ext4_fsblk_t n_blocks_count = 0;
 	unsigned long old_sb_flags;
 	struct ext4_mount_options old_opts;
 	int enable_quota = 0;
@@ -4318,8 +4305,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 	/*
 	 * Allow the "check" option to be passed as a remount option.
 	 */
-	if (!parse_options(data, sb, NULL, &journal_ioprio,
-			   &n_blocks_count, 1)) {
+	if (!parse_options(data, sb, NULL, &journal_ioprio, 1)) {
 		err = -EINVAL;
 		goto restore_opts;
 	}
@@ -4337,8 +4323,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 		set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
 	}
 
-	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) ||
-		n_blocks_count > ext4_blocks_count(es)) {
+	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
 		if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
 			err = -EROFS;
 			goto restore_opts;
@@ -4413,8 +4398,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 			if (sbi->s_journal)
 				ext4_clear_journal_err(sb, es);
 			sbi->s_mount_state = le16_to_cpu(es->s_state);
-			if ((err = ext4_group_extend(sb, es, n_blocks_count)))
-				goto restore_opts;
 			if (!ext4_setup_super(sb, es, 0))
 				sb->s_flags &= ~MS_RDONLY;
 			if (EXT4_HAS_INCOMPAT_FEATURE(sb,



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2 V2] ext4: remove the resize mount option
  2011-11-02 16:36   ` [PATCH 2/2 V2] ext4: remove the resize mount option Eric Sandeen
@ 2011-11-02 17:41     ` Andreas Dilger
  2011-11-02 17:50       ` Eric Sandeen
  2012-02-13 22:44     ` Ted Ts'o
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Dilger @ 2011-11-02 17:41 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On 2011-11-02, at 10:36 AM, Eric Sandeen wrote:
> The resize mount option seems to be of limited value,
> especially in the age of online resize2fs.  Nuke it.

I agree that it is useless today.  That said, with the new online
resize support that Yongqiang Yang is working on, it would again
be possible to just do "remount -o resize={any larger size}" and
it would work without the need for an ioctl or special user tool.

That might be useful in initrd/appliance kind of environments that
put a premium on userspace tools.  I don't run such an environment,
but I've read many times about distro installs that want to do an
image install to the disk and then resize it.  Maybe in the age of
DVDs and 4GB memory sticks this isn't needed anymore?

I'm not dead set on keeping it, just pointing out that it might
again become useful in the same release that this patch lands in.

Cheers, Andreas

> Documentation/filesystems/ext4.txt |    5 -----
> 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 f19cecc..4ea728a 100644
> --- a/Documentation/filesystems/ext4.txt
> +++ b/Documentation/filesystems/ext4.txt
> @@ -362,11 +362,6 @@ nouid32			Disables 32-bit UIDs and GIDs.  This is for
> 			interoperability  with  older kernels which only
> 			store and expect 16-bit values.
> 
> -resize			Allows to resize filesystem to the end of the last
> -			existing block group, further resize has to be done
> -			with resize2fs either online, or offline. It can be
> -			used only with conjunction with remount.
> -
> block_validity		This options allows to enables/disables the in-kernel
> noblock_validity	facility for tracking filesystem metadata blocks
> 			within internal data structures. This allows multi-
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 6a5faac..0f11e99 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1312,7 +1312,7 @@ enum {
> 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
> 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
> 	Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
> -	Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
> +	Opt_usrquota, Opt_grpquota, Opt_i_version,
> 	Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit,
> 	Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
> 	Opt_inode_readahead_blks, Opt_journal_ioprio,
> @@ -1374,7 +1374,6 @@ static const match_table_t tokens = {
> 	{Opt_nobarrier, "nobarrier"},
> 	{Opt_i_version, "i_version"},
> 	{Opt_stripe, "stripe=%u"},
> -	{Opt_resize, "resize"},
> 	{Opt_delalloc, "delalloc"},
> 	{Opt_nodelalloc, "nodelalloc"},
> 	{Opt_mblk_io_submit, "mblk_io_submit"},
> @@ -1484,7 +1483,7 @@ static int clear_qf_name(struct super_block *sb, int qtype)
> static int parse_options(char *options, struct super_block *sb,
> 			 unsigned long *journal_devnum,
> 			 unsigned int *journal_ioprio,
> -			 ext4_fsblk_t *n_blocks_count, int is_remount)
> +			 int is_remount)
> {
> 	struct ext4_sb_info *sbi = EXT4_SB(sb);
> 	char *p;
> @@ -1761,17 +1760,6 @@ set_qf_format:
> 			break;
> 		case Opt_ignore:
> 			break;
> -		case Opt_resize:
> -			if (!is_remount) {
> -				ext4_msg(sb, KERN_ERR,
> -					"resize option only available "
> -					"for remount");
> -				return 0;
> -			}
> -			if (match_int(&args[0], &option) != 0)
> -				return 0;
> -			*n_blocks_count = option;
> -			break;
> 		case Opt_nobh:
> 			ext4_msg(sb, KERN_WARNING,
> 				 "Ignoring deprecated nobh option");
> @@ -3200,13 +3188,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
> 	sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT;
> 
> 	if (!parse_options((char *) sbi->s_es->s_mount_opts, sb,
> -			   &journal_devnum, &journal_ioprio, NULL, 0)) {
> +			   &journal_devnum, &journal_ioprio, 0)) {
> 		ext4_msg(sb, KERN_WARNING,
> 			 "failed to parse options in superblock: %s",
> 			 sbi->s_es->s_mount_opts);
> 	}
> 	if (!parse_options((char *) data, sb, &journal_devnum,
> -			   &journal_ioprio, NULL, 0))
> +			   &journal_ioprio, 0))
> 		goto failed_mount;
> 
> 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
> @@ -4285,7 +4273,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
> {
> 	struct ext4_super_block *es;
> 	struct ext4_sb_info *sbi = EXT4_SB(sb);
> -	ext4_fsblk_t n_blocks_count = 0;
> 	unsigned long old_sb_flags;
> 	struct ext4_mount_options old_opts;
> 	int enable_quota = 0;
> @@ -4318,8 +4305,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
> 	/*
> 	 * Allow the "check" option to be passed as a remount option.
> 	 */
> -	if (!parse_options(data, sb, NULL, &journal_ioprio,
> -			   &n_blocks_count, 1)) {
> +	if (!parse_options(data, sb, NULL, &journal_ioprio, 1)) {
> 		err = -EINVAL;
> 		goto restore_opts;
> 	}
> @@ -4337,8 +4323,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
> 		set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
> 	}
> 
> -	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) ||
> -		n_blocks_count > ext4_blocks_count(es)) {
> +	if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
> 		if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
> 			err = -EROFS;
> 			goto restore_opts;
> @@ -4413,8 +4398,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
> 			if (sbi->s_journal)
> 				ext4_clear_journal_err(sb, es);
> 			sbi->s_mount_state = le16_to_cpu(es->s_state);
> -			if ((err = ext4_group_extend(sb, es, n_blocks_count)))
> -				goto restore_opts;
> 			if (!ext4_setup_super(sb, es, 0))
> 				sb->s_flags &= ~MS_RDONLY;
> 			if (EXT4_HAS_INCOMPAT_FEATURE(sb,


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2 V2] ext4: remove the resize mount option
  2011-11-02 17:41     ` Andreas Dilger
@ 2011-11-02 17:50       ` Eric Sandeen
  2011-11-07 15:56         ` Ted Ts'o
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2011-11-02 17:50 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: ext4 development

On 11/2/11 12:41 PM, Andreas Dilger wrote:
> On 2011-11-02, at 10:36 AM, Eric Sandeen wrote:
>> The resize mount option seems to be of limited value,
>> especially in the age of online resize2fs.  Nuke it.
> 
> I agree that it is useless today.  That said, with the new online
> resize support that Yongqiang Yang is working on, it would again
> be possible to just do "remount -o resize={any larger size}" and
> it would work without the need for an ioctl or special user tool.
> 
> That might be useful in initrd/appliance kind of environments that
> put a premium on userspace tools.  I don't run such an environment,
> but I've read many times about distro installs that want to do an
> image install to the disk and then resize it.  Maybe in the age of
> DVDs and 4GB memory sticks this isn't needed anymore?
> 
> I'm not dead set on keeping it, just pointing out that it might
> again become useful in the same release that this patch lands in.
> 
> Cheers, Andreas

Hm.  Well, just because it -can- be done ... should it be done?
We could do all sorts of things via mount options if we really
wanted to.  mount -o tune2fs=^journal, you name it.

I don't have a super-strong preference either way, but we do
have a tool for this already, so duplicating it in a mount option
seems odd to me.

Thanks,
-Eric


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2 V2] ext4: remove the resize mount option
  2011-11-02 17:50       ` Eric Sandeen
@ 2011-11-07 15:56         ` Ted Ts'o
  0 siblings, 0 replies; 9+ messages in thread
From: Ted Ts'o @ 2011-11-07 15:56 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Andreas Dilger, ext4 development

On Wed, Nov 02, 2011 at 12:50:11PM -0500, Eric Sandeen wrote:
> 
> Hm.  Well, just because it -can- be done ... should it be done?
> We could do all sorts of things via mount options if we really
> wanted to.  mount -o tune2fs=^journal, you name it.

I tend to side with Eric that it seems to be an unnecessary
complication.  At the very least, if we were going to keep it, there
would have to be an xfstests for it, since I'm fairly certain
"mount -o resize=NNN" would be rarely, if ever, tested.

       	  	      	       	       	  - Ted

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] ext4: remove a the journal=update mount option
  2011-11-02 16:33 ` [PATCH 1/2] ext4: remove a the journal=update mount option Eric Sandeen
@ 2012-02-13 22:41   ` Ted Ts'o
  0 siblings, 0 replies; 9+ messages in thread
From: Ted Ts'o @ 2012-02-13 22:41 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Wed, Nov 02, 2011 at 11:33:36AM -0500, Eric Sandeen wrote:
> The V2 journal format was introduced around ten years ago,
> for ext3. It seems highly unlikely that anyone will need this
> migration option for ext4.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2 V2] ext4: remove the resize mount option
  2011-11-02 16:36   ` [PATCH 2/2 V2] ext4: remove the resize mount option Eric Sandeen
  2011-11-02 17:41     ` Andreas Dilger
@ 2012-02-13 22:44     ` Ted Ts'o
  1 sibling, 0 replies; 9+ messages in thread
From: Ted Ts'o @ 2012-02-13 22:44 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Wed, Nov 02, 2011 at 11:36:58AM -0500, Eric Sandeen wrote:
> 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>

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-02-13 22:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-02 16:32 [PATCH 0/2] ext4: remove a couple mount options Eric Sandeen
2011-11-02 16:33 ` [PATCH 1/2] ext4: remove a the journal=update mount option Eric Sandeen
2012-02-13 22:41   ` Ted Ts'o
2011-11-02 16:36 ` [PATCH 2/2] ext4: remove a couple mount options Eric Sandeen
2011-11-02 16:36   ` [PATCH 2/2 V2] ext4: remove the resize mount option Eric Sandeen
2011-11-02 17:41     ` Andreas Dilger
2011-11-02 17:50       ` Eric Sandeen
2011-11-07 15:56         ` Ted Ts'o
2012-02-13 22:44     ` Ted Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.