From: Al Viro <viro@zeniv.linux.org.uk>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, brauner@kernel.org
Subject: Re: [PATCH] ufs: convert ufs to the new mount API
Date: Thu, 16 Jan 2025 19:08:44 +0000 [thread overview]
Message-ID: <20250116190844.GM1977892@ZenIV> (raw)
In-Reply-To: <20250116184932.1084286-1-sandeen@redhat.com>
On Thu, Jan 16, 2025 at 12:49:32PM -0600, Eric Sandeen wrote:
> + switch (opt) {
> + case Opt_type:
> + if (reconfigure &&
> + (ctx->mount_options & UFS_MOUNT_UFSTYPE) != result.uint_32) {
> + pr_err("ufstype can't be changed during remount\n");
> + return -EINVAL;
> }
> + ufs_clear_opt(ctx->mount_options, UFS_MOUNT_UFSTYPE);
> + ufs_set_opt(ctx->mount_options, result.uint_32);
> + break;
Do we really want to support ufstype=foo,ufstype=bar?
> +static void ufs_free_fc(struct fs_context *fc)
> +{
> + kfree(fc->fs_private);
> +}
Grr... That's getting really annoying - we have way too many instances doing
exactly that. Helper, perhaps?
> -#define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt
> -#define ufs_test_opt(o,opt) ((o) & UFS_MOUNT_##opt)
> +#define ufs_clear_opt(o, opt) (o &= ~(opt))
> +#define ufs_set_opt(o, opt) (o |= (opt))
> +#define ufs_test_opt(o, opt) ((o) & opt)
I wonder if we would be better off without those macros (note, BTW,
that ufs_test_opt() is not used at all)...
next prev parent reply other threads:[~2025-01-16 19:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 18:49 [PATCH] ufs: convert ufs to the new mount API Eric Sandeen
2025-01-16 19:08 ` Al Viro [this message]
2025-01-16 22:07 ` Eric Sandeen
2025-01-17 8:11 ` Al Viro
2025-01-17 14:58 ` Eric Sandeen
2025-01-17 16:39 ` 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=20250116190844.GM1977892@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--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.