From: Al Viro <viro@zeniv.linux.org.uk>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: Jeff Layton <jlayton@kernel.org>,
"J . Bruce Fields" <bfields@fieldses.org>,
Arnd Bergmann <arnd@arndb.de>, Paul Moore <paul@paul-moore.com>,
Richard Guy Briggs <rgb@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, Andrei Vagin <avagin@gmail.com>
Subject: Re: [PATCH v2] fs: add new O_MNT flag for opening mount root from mountpoint fd
Date: Thu, 14 Nov 2019 14:13:20 +0000 [thread overview]
Message-ID: <20191114141320.GI26530@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20191114090454.27903-1-ptikhomirov@virtuozzo.com>
On Thu, Nov 14, 2019 at 12:04:54PM +0300, Pavel Tikhomirov wrote:
> More precisely the algorithm is:
> a) openat mpfd to a new mountpoint through parent mount's root -
> p_rootfd (which we already have) or mountpoint fd under a sibling mount
> - s_mpfd if our mountpoint is already overmounted.
> b) create a new mount on mpfd via /proc/<pid>/fd/<N> interface
> c) openat it's rootfd via O_MNT from mpfd
>
> If we have mpfd and rootfd for each mount through /proc/<pid>/fd/<N>
> interface we will be able to bindmount any part of each of already
> created mounts to restore other mounts and we will be able to configure
> mounts, e.g. change sharing or other options even if mounts are
> invisible from fs-root.
Everything else aside (and I'm not thrilled about the idea in general),
you are not handling the situation when that overmount is, in turn,
overmounted. Or when there's an automount set on top of it, etc.
next prev parent reply other threads:[~2019-11-14 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 9:04 [PATCH v2] fs: add new O_MNT flag for opening mount root from mountpoint fd Pavel Tikhomirov
2019-11-14 9:04 ` Pavel Tikhomirov
2019-11-14 14:13 ` Al Viro [this message]
2019-11-14 14:13 ` Al Viro
2019-11-15 7:37 ` Pavel Tikhomirov
2019-11-15 7:37 ` Pavel Tikhomirov
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=20191114141320.GI26530@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=arnd@arndb.de \
--cc=avagin@gmail.com \
--cc=bfields@fieldses.org \
--cc=jlayton@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=ptikhomirov@virtuozzo.com \
--cc=rgb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox