All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: fsdevel <linux-fsdevel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH V2] fs_parser: remove fs_parameter_description name field
Date: Wed, 18 Dec 2019 03:36:06 +0000	[thread overview]
Message-ID: <20191218033606.GF4203@ZenIV.linux.org.uk> (raw)
In-Reply-To: <22be7526-d9da-5309-22a8-3405ed1c0842@sandeen.net>

On Fri, Dec 06, 2019 at 10:31:57AM -0600, Eric Sandeen wrote:
> There doesn't seem to be a strong reason to have a copy of the
> filesystem name string in the fs_parameter_description structure;
> it's easy enough to get the name from the fs_type, and using it
> instead ensures consistency across messages (for example,
> vfs_parse_fs_param() already uses fc->fs_type->name for the error
> messages, because it doesn't have the fs_parameter_description).

Arrgh...  That used to be fine.  Now we have this:
static int rbd_parse_param(struct fs_parameter *param,
                            struct rbd_parse_opts_ctx *pctx)
{
        struct rbd_options *opt = pctx->opts;
        struct fs_parse_result result; 
        int token, ret;

        ret = ceph_parse_param(param, pctx->copts, NULL);
        if (ret != -ENOPARAM)
                return ret;

        token = fs_parse(NULL, rbd_parameters, param, &result);
			 ^^^^

	Cthulhu damn it...  And yes, that crap used to work.
Frankly, I'm tempted to allocate fs_context in there (in
rbd_parse_options(), or in rbd_add_parse_args()) - we've other
oddities due to that...

	Alternatively, we could provide __fs_parse() that
would take name as a separate argument and accepted NULL fc,
with fs_parse() being a wrapper for that.

*grumble*

  parent reply	other threads:[~2019-12-18  3:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 16:31 [PATCH V2] fs_parser: remove fs_parameter_description name field Eric Sandeen
2019-12-06 16:45 ` [PATCH V3] " Eric Sandeen
2019-12-18  3:36 ` Al Viro [this message]
2019-12-18  3:43   ` [PATCH V2] " Eric Sandeen
2019-12-18  4:06     ` Al Viro
2019-12-19 23:29       ` Al Viro
2019-12-20 18:14         ` Al Viro

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=20191218033606.GF4203@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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.