[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025-10-07-lavish-refried-navy-journey-EqHk9K@cyphar.com>
Date: Wed, 8 Oct 2025 05:40:52 +1100
From: Aleksa Sarai <cyphar@...har.com>
To: Christian Brauner <brauner@...nel.org>
Cc: Pavel Tikhomirov <ptikhomirov@...tuozzo.com>,
Al Viro <viro@...iv.linux.org.uk>, Bhavik Sachdev <b.sachdev1904@...il.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, Jan Kara <jack@...e.cz>,
John Garry <john.g.garry@...cle.com>, Arnaldo Carvalho de Melo <acme@...hat.com>,
"Darrick J . Wong" <djwong@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Ingo Molnar <mingo@...nel.org>, Andrei Vagin <avagin@...il.com>,
Alexander Mikhalitsyn <alexander@...alicyn.com>
Subject: Re: [PATCH 2/4] fs/namespace: add umounted mounts to umount_mnt_ns
On 2025-10-06, Christian Brauner <brauner@...nel.org> wrote:
> On Fri, Oct 03, 2025 at 01:03:46PM +0800, Pavel Tikhomirov wrote:
> > 3) We had an alternative approach to make unmounted mounts mountinfo visible
> > for the user, by allowing fd-based statmount() https://github.com/bsach64/linux/commit/ac0c03d44fb1e6f0745aec81079fca075e75b354
> >
> > But we also recognize a problem with it that it would require getting
> > mountinfo from fd which is not root dentry of the mount, but any dentry (as
> > we (CRIU) don't really have an option to choose which fd will be given to
> > us).
>
> The part about this just using an fd is - supresses gag reflex - fine.
> We do that with the mount namespaces for listmount() already via
> mnt_req->spare.
>
> The part that I dislike is exactly the one you pointed out: using an
> arbitrary fd to retrieve information about the mount but it's probably
> something we can live with since the alternative is complicating the
> lifetime rules of the mount and namespace interaction.
Well, to be fair this is basically the fstatfs(2) API so while it is
kind of funky it's not without precedence. open_by_handle_at(2) has
something similar if you don't mind incredibly funky API comparisons. ;)
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
Download attachment "signature.asc" of type "application/pgp-signature" (266 bytes)
Powered by blists - more mailing lists