All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org, tytso@mit.edu,
	linux-fsdevel@vger.kernel.org, cmaiolino@redhat.com
Subject: Re: [PATCH v3 11/13] ext4: change token2str() to use ext4_param_specs
Date: Wed, 27 Oct 2021 13:52:46 +0200	[thread overview]
Message-ID: <20211027115246.bewgpt35szs7ppda@work> (raw)
In-Reply-To: <20211026120953.mropvelvr4id7mej@work>

On Tue, Oct 26, 2021 at 02:09:53PM +0200, Lukas Czerner wrote:
> On Tue, Oct 26, 2021 at 01:40:43PM +0200, Carlos Maiolino wrote:
> > On Thu, Oct 21, 2021 at 01:45:06PM +0200, Lukas Czerner wrote:
> > > Chage token2str() to use ext4_param_specs instead of tokens so that we
> > 
> > ^ Change.
> > 
> > > can get rid of tokens entirely.
> > 
> > If you're removing tokens entirely, maybe the name token2str() doesn't make
> > sense anymore?
> 
> True, I guess it's no longer called "token" so maybe option2str() ?

Actually it's still called token in the struct mount_opts which is what
we're passing down to the token2str() anyway. Since this really is
inconsequential stuff I'll leave it as it is.

-Lukas

> 
> -Lukas
> 
> > 
> > > 
> > > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > > ---
> > >  fs/ext4/super.c | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > > index bdcaa158eab8..0ccd47f3fa91 100644
> > > --- a/fs/ext4/super.c
> > > +++ b/fs/ext4/super.c
> > > @@ -3037,12 +3037,12 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
> > >  
> > >  static const char *token2str(int token)
> > >  {
> > > -	const struct match_token *t;
> > > +	const struct fs_parameter_spec *spec;
> > >  
> > > -	for (t = tokens; t->token != Opt_err; t++)
> > > -		if (t->token == token && !strchr(t->pattern, '='))
> > > +	for (spec = ext4_param_specs; spec->name != NULL; spec++)
> > > +		if (spec->opt == token && !spec->type)
> > >  			break;
> > > -	return t->pattern;
> > > +	return spec->name;
> > >  }
> > >  
> > >  /*
> > > -- 
> > > 2.31.1
> > > 
> > 
> > -- 
> > Carlos
> > 
> 


  reply	other threads:[~2021-10-27 11:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 11:44 [PATCH v3 00/13] ext4: new mount API conversion Lukas Czerner
2021-10-21 11:44 ` [PATCH v3 01/13] fs_parse: allow parameter value to be empty Lukas Czerner
2021-10-25 11:12   ` Carlos Maiolino
2021-10-21 11:44 ` [PATCH v3 02/13] ext4: Add fs parameter specifications for mount options Lukas Czerner
2021-10-21 11:44 ` [PATCH v3 03/13] ext4: move option validation to a separate function Lukas Czerner
2021-10-21 11:44 ` [PATCH v3 04/13] ext4: Change handle_mount_opt() to use fs_parameter Lukas Czerner
2021-10-21 11:45 ` [PATCH v3 05/13] ext4: Allow sb to be NULL in ext4_msg() Lukas Czerner
2021-10-21 11:45 ` [PATCH v3 06/13] ext4: move quota configuration out of handle_mount_opt() Lukas Czerner
2021-10-21 19:57   ` kernel test robot
2021-10-21 19:57     ` kernel test robot
2021-10-21 11:45 ` [PATCH v3 07/13] ext4: check ext2/3 compatibility outside handle_mount_opt() Lukas Czerner
2021-10-21 11:45 ` [PATCH v3 08/13] ext4: get rid of super block and sbi from handle_mount_ops() Lukas Czerner
2021-10-27  1:32   ` kernel test robot
2021-10-27  1:32     ` kernel test robot
2021-10-21 11:45 ` [PATCH v3 09/13] ext4: Completely separate options parsing and sb setup Lukas Czerner
2021-10-26 11:41   ` Carlos Maiolino
2021-10-21 11:45 ` [PATCH v3 10/13] ext4: clean up return values in handle_mount_opt() Lukas Czerner
2021-10-21 11:45 ` [PATCH v3 11/13] ext4: change token2str() to use ext4_param_specs Lukas Czerner
2021-10-26 11:40   ` Carlos Maiolino
2021-10-26 12:09     ` Lukas Czerner
2021-10-27 11:52       ` Lukas Czerner [this message]
2021-10-21 11:45 ` [PATCH v3 12/13] ext4: switch to the new mount api Lukas Czerner
2022-01-13 11:29   ` Jon Hunter
2022-01-13 12:08     ` Lukas Czerner
2022-01-13 15:06       ` Jon Hunter
2022-01-13 16:10         ` Jon Hunter
2022-01-14  9:40           ` Jon Hunter
2021-10-21 11:45 ` [PATCH v3 13/13] ext4: Remove unused match_table_t tokens Lukas Czerner
2021-10-26 11:39 ` [PATCH v3 00/13] ext4: new mount API conversion Carlos Maiolino

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=20211027115246.bewgpt35szs7ppda@work \
    --to=lczerner@redhat.com \
    --cc=cmaiolino@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.