[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180607103347.i6bqtxmchn6pkuua@quack2.suse.cz>
Date: Thu, 7 Jun 2018 12:33:47 +0200
From: Jan Kara <jack@...e.cz>
To: Chengguang Xu <cgxu519@....com>
Cc: jack@...e.com, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext2: remove nocheck option
On Thu 07-06-18 16:28:44, Chengguang Xu wrote:
> The nocheck option is useless, so remove related things.
>
> Signed-off-by: Chengguang Xu <cgxu519@....com>
The option is there for backwards compatibility. I don't think anybody uses
it but better be sure. So let's just add a warning when check=none /
nocheck is specified like "Mount option check=none has no effect, is
deprecated, and will be removed. Please update your mount options." And
then in an year or so we can just remove everything like you suggest.
Honza
> ---
> Documentation/filesystems/ext2.txt | 3 ---
> fs/ext2/ext2.h | 3 ---
> fs/ext2/super.c | 10 +---------
> 3 files changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt
> index 81c0becab225..5160c9cb8efe 100644
> --- a/Documentation/filesystems/ext2.txt
> +++ b/Documentation/filesystems/ext2.txt
> @@ -17,9 +17,6 @@ set using tune2fs(8). Kernel-determined defaults are indicated by (*).
> bsddf (*) Makes `df' act like BSD.
> minixdf Makes `df' act like Minix.
>
> -check=none, nocheck (*) Don't do extra checking of bitmaps on mount
> - (check=normal and check=strict options removed)
> -
> dax Use direct access (no page cache). See
> Documentation/filesystems/dax.txt.
>
> diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
> index cc40802ddfa8..0ed36a5642db 100644
> --- a/fs/ext2/ext2.h
> +++ b/fs/ext2/ext2.h
> @@ -374,7 +374,6 @@ struct ext2_inode {
> /*
> * Mount flags
> */
> -#define EXT2_MOUNT_CHECK 0x000001 /* Do mount-time checks */
> #define EXT2_MOUNT_OLDALLOC 0x000002 /* Don't use the new Orlov allocator */
> #define EXT2_MOUNT_GRPID 0x000004 /* Create files with directory's group */
> #define EXT2_MOUNT_DEBUG 0x000008 /* Some debugging messages */
> @@ -748,7 +747,6 @@ extern void ext2_free_blocks (struct inode *, unsigned long,
> unsigned long);
> extern unsigned long ext2_count_free_blocks (struct super_block *);
> extern unsigned long ext2_count_dirs (struct super_block *);
> -extern void ext2_check_blocks_bitmap (struct super_block *);
> extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
> unsigned int block_group,
> struct buffer_head ** bh);
> @@ -771,7 +769,6 @@ extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page
> extern struct inode * ext2_new_inode (struct inode *, umode_t, const struct qstr *);
> extern void ext2_free_inode (struct inode *);
> extern unsigned long ext2_count_free_inodes (struct super_block *);
> -extern void ext2_check_inodes_bitmap (struct super_block *);
> extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
>
> /* inode.c */
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index c09289a42dc5..b8471812f90e 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -441,7 +441,7 @@ static unsigned long get_sb_block(void **data)
> enum {
> Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid,
> Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic,
> - Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug,
> + Opt_err_ro, Opt_nouid32, Opt_debug,
> Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr,
> Opt_acl, Opt_noacl, Opt_xip, Opt_dax, Opt_ignore, Opt_err, Opt_quota,
> Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation
> @@ -461,8 +461,6 @@ static const match_table_t tokens = {
> {Opt_err_panic, "errors=panic"},
> {Opt_err_ro, "errors=remount-ro"},
> {Opt_nouid32, "nouid32"},
> - {Opt_nocheck, "check=none"},
> - {Opt_nocheck, "nocheck"},
> {Opt_debug, "debug"},
> {Opt_oldalloc, "oldalloc"},
> {Opt_orlov, "orlov"},
> @@ -556,9 +554,6 @@ static int parse_options(char *options, struct super_block *sb,
> case Opt_nouid32:
> set_opt (opts->s_mount_opt, NO_UID32);
> break;
> - case Opt_nocheck:
> - clear_opt (opts->s_mount_opt, CHECK);
> - break;
> case Opt_debug:
> set_opt (opts->s_mount_opt, DEBUG);
> break;
> @@ -1333,9 +1328,6 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
> new_opts.s_resgid = sbi->s_resgid;
> spin_unlock(&sbi->s_lock);
>
> - /*
> - * Allow the "check" option to be passed as a remount option.
> - */
> if (!parse_options(data, sb, &new_opts))
> return -EINVAL;
>
> --
> 2.17.1
>
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists