All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, lihongbo22@huawei.com,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/7] f2fs: move the option parser into handle_mount_opt
Date: Wed, 7 May 2025 15:02:33 +0000	[thread overview]
Message-ID: <aBt2CVnq8LnrbMzn@google.com> (raw)
In-Reply-To: <db0c33f2-9fa0-4ee7-b5c9-e055fcc4d538@redhat.com>

On 05/07, Eric Sandeen wrote:
> On 5/7/25 6:26 AM, Chao Yu wrote:
> > On 4/20/25 23:25, Eric Sandeen wrote:
> >> From: Hongbo Li <lihongbo22@huawei.com>
> >>
> >> In handle_mount_opt, we use fs_parameter to parse each option.
> >> However we're still using the old API to get the options string.
> >> Using fsparams parse_options allows us to remove many of the Opt_
> >> enums, so remove them.
> >>
> >> The checkpoint disable cap (or percent) involves rather complex
> >> parsing; we retain the old match_table mechanism for this, which
> >> handles it well.
> >>
> >> There are some changes about parsing options:
> >>   1. For `active_logs`, `inline_xattr_size` and `fault_injection`,
> >>      we use s32 type according the internal structure to record the
> >>      option's value.
> > 
> > We'd better to use u32 type for these options, as they should never
> > be negative.
> > 
> > Can you please update based on below patch?
> > 
> > https://lore.kernel.org/linux-f2fs-devel/20250507112425.939246-1-chao@kernel.org
> 
> Hi Chao - I agree that that patch makes sense, but maybe there is a timing
> issue now? At the moment, there is a mix of signed and unsigned handling
> for these options. I agree that the conversion series probably should have
> left the parsing type as unsigned, but it was a mix internally, so it was
> difficult to know for sure.
> 
> For your patch above, if it is to stand alone or be merged first, it 
> should probably also change the current parsing to match_uint. (this would
> also make it backportable to -stable kernels, if you want to).
> 
> Otherwise, I would suggest that if it is merged after the mount API series,
> then your patch to clean up internal types could fix the (new mount API)
> parsing from %s to %u at the same time?

Yeah, agreed we'd better applying the type change later, once mount API is
successfully landed. Chao, let's keep checking any missing cases. :)

> 
> Happy to do it either way but your patch should probably be internally
> consistent, changing the parsing types at the same time.
> 
> (I suppose we could incorporate your patch into the mount API series too,
> though it'd be a little strange to have a minor bugfix like this buried
> in the series.)
> 
> Thanks,
> -Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Chao Yu <chao@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, lihongbo22@huawei.com
Subject: Re: [PATCH 2/7] f2fs: move the option parser into handle_mount_opt
Date: Wed, 7 May 2025 15:02:33 +0000	[thread overview]
Message-ID: <aBt2CVnq8LnrbMzn@google.com> (raw)
In-Reply-To: <db0c33f2-9fa0-4ee7-b5c9-e055fcc4d538@redhat.com>

On 05/07, Eric Sandeen wrote:
> On 5/7/25 6:26 AM, Chao Yu wrote:
> > On 4/20/25 23:25, Eric Sandeen wrote:
> >> From: Hongbo Li <lihongbo22@huawei.com>
> >>
> >> In handle_mount_opt, we use fs_parameter to parse each option.
> >> However we're still using the old API to get the options string.
> >> Using fsparams parse_options allows us to remove many of the Opt_
> >> enums, so remove them.
> >>
> >> The checkpoint disable cap (or percent) involves rather complex
> >> parsing; we retain the old match_table mechanism for this, which
> >> handles it well.
> >>
> >> There are some changes about parsing options:
> >>   1. For `active_logs`, `inline_xattr_size` and `fault_injection`,
> >>      we use s32 type according the internal structure to record the
> >>      option's value.
> > 
> > We'd better to use u32 type for these options, as they should never
> > be negative.
> > 
> > Can you please update based on below patch?
> > 
> > https://lore.kernel.org/linux-f2fs-devel/20250507112425.939246-1-chao@kernel.org
> 
> Hi Chao - I agree that that patch makes sense, but maybe there is a timing
> issue now? At the moment, there is a mix of signed and unsigned handling
> for these options. I agree that the conversion series probably should have
> left the parsing type as unsigned, but it was a mix internally, so it was
> difficult to know for sure.
> 
> For your patch above, if it is to stand alone or be merged first, it 
> should probably also change the current parsing to match_uint. (this would
> also make it backportable to -stable kernels, if you want to).
> 
> Otherwise, I would suggest that if it is merged after the mount API series,
> then your patch to clean up internal types could fix the (new mount API)
> parsing from %s to %u at the same time?

Yeah, agreed we'd better applying the type change later, once mount API is
successfully landed. Chao, let's keep checking any missing cases. :)

> 
> Happy to do it either way but your patch should probably be internally
> consistent, changing the parsing types at the same time.
> 
> (I suppose we could incorporate your patch into the mount API series too,
> though it'd be a little strange to have a minor bugfix like this buried
> in the series.)
> 
> Thanks,
> -Eric

  reply	other threads:[~2025-05-07 15:02 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-20 15:24 [f2fs-dev] [PATCH 0/7 V2] f2fs: new mount API conversion Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:24 ` Eric Sandeen
2025-04-20 15:25 ` [f2fs-dev] [PATCH 1/7] f2fs: Add fs parameter specifications for mount options Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-05-07  9:54   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-05-07  9:54     ` Chao Yu
2025-04-20 15:25 ` [f2fs-dev] [PATCH 2/7] f2fs: move the option parser into handle_mount_opt Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-05-07 11:26   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-05-07 11:26     ` Chao Yu
2025-05-07 12:31     ` [f2fs-dev] " Eric Sandeen via Linux-f2fs-devel
2025-05-07 12:31       ` Eric Sandeen
2025-05-07 15:02       ` Jaegeuk Kim via Linux-f2fs-devel [this message]
2025-05-07 15:02         ` Jaegeuk Kim
2025-05-08  3:29         ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-05-08  3:29           ` Chao Yu
2025-05-08  3:28       ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-05-08  3:28         ` Chao Yu
2025-04-20 15:25 ` [f2fs-dev] [PATCH 3/7] f2fs: Allow sbi to be NULL in f2fs_printk Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-05-07 11:29   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-05-07 11:29     ` Chao Yu
2025-04-20 15:25 ` [f2fs-dev] [PATCH 4/7] f2fs: Add f2fs_fs_context to record the mount options Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-04-20 15:25 ` [f2fs-dev] [PATCH 5/7] f2fs: separate the options parsing and options checking Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-04-21 16:34   ` [f2fs-dev] " kernel test robot
2025-04-21 16:34     ` kernel test robot
2025-04-21 17:37   ` [f2fs-dev] " kernel test robot
2025-04-21 17:37     ` kernel test robot
2025-04-21 17:37   ` [f2fs-dev] " kernel test robot
2025-04-21 17:37     ` kernel test robot
2025-04-20 15:25 ` [f2fs-dev] [PATCH 6/7] f2fs: introduce fs_context_operation structure Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-04-20 15:25 ` [f2fs-dev] [PATCH 7/7] f2fs: switch to the new mount api Eric Sandeen via Linux-f2fs-devel
2025-04-20 15:25   ` Eric Sandeen
2025-04-22  2:39 ` [f2fs-dev] [PATCH 0/7 V2] f2fs: new mount API conversion Eric Sandeen via Linux-f2fs-devel
2025-04-22  2:39   ` Eric Sandeen
2025-07-11 16:30 ` [f2fs-dev] " patchwork-bot+f2fs--- via Linux-f2fs-devel
2025-07-11 16:30   ` patchwork-bot+f2fs

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=aBt2CVnq8LnrbMzn@google.com \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=jaegeuk@kernel.org \
    --cc=lihongbo22@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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 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.