From: Kees Cook <keescook@chromium.org>
To: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 4/8] vfs: Convert pstore to fs_context
Date: Thu, 21 Mar 2019 09:31:46 -0700 [thread overview]
Message-ID: <CAGXu5jJvSk=sJbjE+-6USvr4qXHxxwEOK64_FAWh74-eBkm+YQ@mail.gmail.com> (raw)
In-Reply-To: <155316888615.29437.17558157678296689830.stgit@warthog.procyon.org.uk>
On Thu, Mar 21, 2019 at 4:48 AM David Howells <dhowells@redhat.com> wrote:
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Kees Cook <keescook@chromium.org>
> cc: Anton Vorontsov <anton@enomsg.org>
> cc: Colin Cross <ccross@android.com>
> cc: Tony Luck <tony.luck@intel.com>
Thanks for doing this conversion!
Acked-by: Kees Cook <keescook@chromium.org>
Some questions/nits below:
> +static int pstore_parse_param(struct fs_context *fc, struct fs_parameter *param)
> +{
> + struct pstore_fs_context *ctx = fc->fs_private;
> + struct fs_parse_result result;
> + int opt;
> +
> + opt = fs_parse(fc, &pstore_fs_parameters, param, &result);
> + if (opt < 0)
> + return opt;
> +
> + switch (opt) {
> + case Opt_kmsg_bytes:
> + ctx->kmsg_bytes = result.uint_32;
> + break;
> + }
>
> - while ((p = strsep(&options, ",")) != NULL) {
> - int token;
> + return 0;
> +}
>
> - if (!*p)
> - continue;
> +static void pstore_apply_param(struct fs_context *fc)
> +{
> + struct pstore_fs_context *ctx = fc->fs_private;
>
> - token = match_token(p, tokens, args);
> - switch (token) {
> - case Opt_kmsg_bytes:
> - if (!match_int(&args[0], &option))
> - pstore_set_kmsg_bytes(option);
> - break;
> - }
> - }
> + pstore_set_kmsg_bytes(ctx->kmsg_bytes);
> }
Why the separation between parse and apply now? Is this due to the
reconfigure calls? (i.e. why not call pstore_set_kmsg_bytes() in
pstore_parse_param()?
> @@ -416,14 +423,38 @@ static int pstore_fill_super(struct super_block *sb, void *data, int silent)
> return -ENOMEM;
>
> pstore_get_records(0);
> -
> return 0;
> }
I prefer to keep a blank before "return", but no need to drop this
unless it gets a respin.
Thanks again!
--
Kees Cook
next prev parent reply other threads:[~2019-03-21 16:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 11:47 [RFC PATCH 0/8] Convert mount_single-using filesystems to fs_context David Howells
2019-03-21 11:47 ` [RFC PATCH 1/8] vfs: Add a single-or-reconfig keying to vfs_get_super() David Howells
2019-03-21 11:47 ` [RFC PATCH 2/8] vfs: Convert debugfs to fs_context David Howells
2019-03-21 11:47 ` [RFC PATCH 3/8] vfs: Convert tracefs " David Howells
2019-03-21 12:58 ` Steven Rostedt
2019-03-21 15:49 ` David Howells
2019-03-21 15:59 ` Steven Rostedt
2019-03-21 17:13 ` David Howells
2019-03-21 15:50 ` David Howells
2019-03-21 11:48 ` [RFC PATCH 4/8] vfs: Convert pstore " David Howells
2019-03-21 16:31 ` Kees Cook [this message]
2019-03-21 17:03 ` David Howells
2019-03-21 17:35 ` Kees Cook
2019-03-21 11:48 ` [RFC PATCH 5/8] hypfs: Fix error number left in struct pointer member David Howells
2019-03-21 11:48 ` [RFC PATCH 6/8] vfs: Convert hypfs to fs_context David Howells
2019-03-21 11:48 ` [RFC PATCH 7/8] vfs: Convert spufs " David Howells
2019-03-21 11:48 ` [RFC PATCH 8/8] vfs: Kill off mount_single() David Howells
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='CAGXu5jJvSk=sJbjE+-6USvr4qXHxxwEOK64_FAWh74-eBkm+YQ@mail.gmail.com' \
--to=keescook@chromium.org \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).