public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: Eric Sandeen <sandeen@redhat.com>,
	Daniel Rosenberg <drosen@google.com>,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] Revert "f2fs: remove unreachable lazytime mount option parsing"
Date: Tue, 19 Nov 2024 20:48:33 +0000	[thread overview]
Message-ID: <Zzz5ocjKK_naOnMq@google.com> (raw)
In-Reply-To: <2d26eeee-01f7-445b-a1d2-bc2de65b5599@kernel.org>

On 11/19, Chao Yu wrote:
> On 2024/11/13 5:39, Jaegeuk Kim via Linux-f2fs-devel wrote:
> > Hi Eric,
> > 
> > Could you please check this revert as it breaks the mount()?
> > It seems F2FS needs to implement new mount support.
> 
> Hi all,
> 
> Actually, if we want to enable lazytime option, we can use mount
> syscall as:
> 
> mount("/dev/vdb", "/mnt/test", "f2fs", MS_LAZYTIME, NULL);
> 
> or use shell script as:
> 
> mount -t f2fs -o lazytime /dev/vdb /mnt/test
> 
> IIUC, the reason why mount command can handle lazytime is, after
> 8c7f073aaeaa ("libmount: add support for MS_LAZYTIME"), mount command
> supports to map "lazytime" to MS_LAZYTIME, and use MS_LAZYTIME in
> parameter @mountflags of mount(2).
> 
> So, it looks we have alternative way to enable/disable lazytime feature
> after removing Opt_{no,}lazytime parsing in f2fs, do we really need this
> revert patch?

This is a regression of the below command. I don't think offering others are
feasible.

mount("/dev/vdb", "/mnt/test", "f2fs", 0, "lazytime");

> 
> Thanks,
> 
> > 
> > Thanks,
> > 
> > On 11/12, Jaegeuk Kim wrote:
> > > This reverts commit 54f43a10fa257ad4af02a1d157fefef6ebcfa7dc.
> > > 
> > > The above commit broke the lazytime mount, given
> > > 
> > > mount("/dev/vdb", "/mnt/test", "f2fs", 0, "lazytime");
> > > 
> > > CC: stable@vger.kernel.org # 6.11+
> > > Signed-off-by: Daniel Rosenberg <drosen@google.com>
> > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > > ---
> > >   fs/f2fs/super.c | 10 ++++++++++
> > >   1 file changed, 10 insertions(+)
> > > 
> > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > > index 49519439b770..35c4394e4fc6 100644
> > > --- a/fs/f2fs/super.c
> > > +++ b/fs/f2fs/super.c
> > > @@ -150,6 +150,8 @@ enum {
> > >   	Opt_mode,
> > >   	Opt_fault_injection,
> > >   	Opt_fault_type,
> > > +	Opt_lazytime,
> > > +	Opt_nolazytime,
> > >   	Opt_quota,
> > >   	Opt_noquota,
> > >   	Opt_usrquota,
> > > @@ -226,6 +228,8 @@ static match_table_t f2fs_tokens = {
> > >   	{Opt_mode, "mode=%s"},
> > >   	{Opt_fault_injection, "fault_injection=%u"},
> > >   	{Opt_fault_type, "fault_type=%u"},
> > > +	{Opt_lazytime, "lazytime"},
> > > +	{Opt_nolazytime, "nolazytime"},
> > >   	{Opt_quota, "quota"},
> > >   	{Opt_noquota, "noquota"},
> > >   	{Opt_usrquota, "usrquota"},
> > > @@ -922,6 +926,12 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
> > >   			f2fs_info(sbi, "fault_type options not supported");
> > >   			break;
> > >   #endif
> > > +		case Opt_lazytime:
> > > +			sb->s_flags |= SB_LAZYTIME;
> > > +			break;
> > > +		case Opt_nolazytime:
> > > +			sb->s_flags &= ~SB_LAZYTIME;
> > > +			break;
> > >   #ifdef CONFIG_QUOTA
> > >   		case Opt_quota:
> > >   		case Opt_usrquota:
> > > -- 
> > > 2.47.0.277.g8800431eea-goog
> > 
> > 
> > _______________________________________________
> > Linux-f2fs-devel mailing list
> > Linux-f2fs-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2024-11-19 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12  1:08 [PATCH] Revert "f2fs: remove unreachable lazytime mount option parsing" Jaegeuk Kim
2024-11-12 21:39 ` Jaegeuk Kim
2024-11-19  2:18   ` [f2fs-dev] " Chao Yu
2024-11-19 20:48     ` Jaegeuk Kim [this message]
2024-11-20  2:57       ` Chao Yu
2024-11-20 20:35         ` Jaegeuk Kim
2024-11-20 14:27   ` Eric Sandeen
2024-11-20 14:52     ` Eric Sandeen
2024-11-20 20:38       ` Jaegeuk Kim
2024-11-18 17:00 ` [f2fs-dev] " patchwork-bot+f2fs
2024-11-21  1:15 ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zzz5ocjKK_naOnMq@google.com \
    --to=jaegeuk@kernel.org \
    --cc=chao@kernel.org \
    --cc=drosen@google.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox