lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150129182745.GB15313@jaegeuk-mac02.mot.com>
Date:	Thu, 29 Jan 2015 10:27:45 -0800
From:	Jaegeuk Kim <jaegeuk@...nel.org>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH 2/5] f2fs: support norecovery mount option

Hi Chao,

On Thu, Jan 29, 2015 at 07:52:56PM +0800, Chao Yu wrote:
> Hi Jaegeuk,
> 
> > -----Original Message-----
> > From: linux-fsdevel-owner@...r.kernel.org [mailto:linux-fsdevel-owner@...r.kernel.org] On
> > Behalf Of Jaegeuk Kim
> > Sent: Wednesday, January 28, 2015 7:32 AM
> > To: linux-kernel@...r.kernel.org; linux-fsdevel@...r.kernel.org;
> > linux-f2fs-devel@...ts.sourceforge.net
> > Cc: Jaegeuk Kim
> > Subject: [PATCH 2/5] f2fs: support norecovery mount option
> > 
> > This patch adds a mount option, norecovery, which is mostly same as
> > disable_roll_forward. The only difference is that norecovery should be activated
> > with read-only mount option.
> > 
> > This can be used when user wants to check whether f2fs is mountable or not
> > without any recovery process. (e.g., xfstests/200)
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> > ---
> >  fs/f2fs/super.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index fbc7f5a..0ca1fb2 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -42,6 +42,7 @@ static struct kset *f2fs_kset;
> >  enum {
> >  	Opt_gc_background,
> >  	Opt_disable_roll_forward,
> > +	Opt_norecovery,
> >  	Opt_discard,
> >  	Opt_noheap,
> >  	Opt_user_xattr,
> > @@ -62,6 +63,7 @@ enum {
> >  static match_table_t f2fs_tokens = {
> >  	{Opt_gc_background, "background_gc=%s"},
> >  	{Opt_disable_roll_forward, "disable_roll_forward"},
> > +	{Opt_norecovery, "norecovery"},
> 
> IMO, it's better to show 'norecovery' in f2fs_show_options instead of showing
> 'disable_roll_forward', so user will know the details of mount option as we show.

Hmm, I did think like that at the first time.
But, as you guess, this option is totally same as ro,disable_roll_forward.
So, I just wanted to avoid user's confusing for the behaviors of this option.

> 
> >  	{Opt_discard, "discard"},
> >  	{Opt_noheap, "no_heap"},
> >  	{Opt_user_xattr, "user_xattr"},
> > @@ -287,6 +289,12 @@ static int parse_options(struct super_block *sb, char *options)
> >  		case Opt_disable_roll_forward:
> >  			set_opt(sbi, DISABLE_ROLL_FORWARD);
> >  			break;
> > +		case Opt_norecovery:
> > +			/* this option mounts f2fs with ro */
> > +			set_opt(sbi, DISABLE_ROLL_FORWARD);
> 
> set_opt(sbi, NORECOVERY); and check this option before recover_fsync_data()?
> 
> It's better to add description for this "norecovery" option in Documentation.

I'll do that.

Thanks,

> 
> Thanks,
> 
> > +			if (!f2fs_readonly(sb))
> > +				return -EINVAL;
> > +			break;
> >  		case Opt_discard:
> >  			set_opt(sbi, DISCARD);
> >  			break;
> > --
> > 2.1.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ