From: David Howells <dhowells@redhat.com>
To: Christian Brauner <brauner@kernel.org>
Cc: dhowells@redhat.com, linux-cachefs@redhat.com,
linux-fsdevel@vger.kernel.org,
Amir Goldstein <amir73il@gmail.com>,
Christian Brauner <christian.brauner@ubuntu.com>
Subject: Re: [PATCH] cachefiles: use private mounts in cache->mnt
Date: Tue, 06 Apr 2021 10:12:25 +0100 [thread overview]
Message-ID: <107463.1617700345@warthog.procyon.org.uk> (raw)
In-Reply-To: <20210405164603.281189-1-brauner@kernel.org>
Christian Brauner <brauner@kernel.org> wrote:
> Besides that - and probably irrelevant from the perspective of a
> cachefiles developer - it also makes things simpler for a variety of
> other vfs features. One concrete example is fanotify.
What about cachefilesd? That walks over the tree regularly, stats things and
maybe deletes things. Should that be in a private mount/namespace too?
> This seems a rather desirable property as the underlying path can't e.g.
> suddenly go from read-write to read-only and in general it means that
> cachefiles is always in full control of the underlying mount after the
> user has allowed it to be used as a cache.
That's not entirely true, but I guess that emergency R/O conversion isn't a
case that's worrisome - and, in any case, only affects the superblock.
> ret = -EINVAL;
> - if (mnt_user_ns(path.mnt) != &init_user_ns) {
> + if (mnt_user_ns(cache->mnt) != &init_user_ns) {
> pr_warn("File cache on idmapped mounts not supported");
> goto error_unsupported;
> }
Is it worth doing this check before calling clone_private_mount()?
> + cache_path = path;
> + cache_path.mnt = cache->mnt;
Seems pointless to copy all of path into cache_path rather than just
path.dentry.
Apart from that, looks okay.
David
next prev parent reply other threads:[~2021-04-06 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 16:46 [PATCH] cachefiles: use private mounts in cache->mnt Christian Brauner
2021-04-06 9:12 ` David Howells [this message]
2021-04-06 9:49 ` Christian Brauner
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=107463.1617700345@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=christian.brauner@ubuntu.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).