[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200403111144.GB34663@gardel-login>
Date: Fri, 3 Apr 2020 13:11:44 +0200
From: Lennart Poettering <mzxreary@...inter.de>
To: Ian Kent <raven@...maw.net>
Cc: Miklos Szeredi <miklos@...redi.hu>,
David Howells <dhowells@...hat.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>, dray@...hat.com,
Karel Zak <kzak@...hat.com>,
Miklos Szeredi <mszeredi@...hat.com>,
Steven Whitehouse <swhiteho@...hat.com>,
Jeff Layton <jlayton@...hat.com>, andres@...razel.de,
keyrings@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, Aleksa Sarai <cyphar@...har.com>
Subject: Re: Upcoming: Notifications, FS notifications and fsinfo()
On Fr, 03.04.20 09:44, Ian Kent (raven@...maw.net) wrote:
> > Currently the only way to find the mount id from a path is by parsing
> > /proc/self/fdinfo/$fd. It is trivial, however, to extend statx(2) to
> > return it directly from a path. Also the mount notification queue
> > that David implemented contains the mount ID of the changed mount.
I would love to have the mount ID exposed via statx().
In systemd we generally try name_to_handle_at() to query the mount ID
first. It returns both the actual fhandle and the mount ID after all,
and we then throw the fhandle away. It's not available on all fs
though, but it has the benefit that it works without procfs and on
a number of older kernels that didn't expose the mnt id in fdinfo.
Lennart
--
Lennart Poettering, Berlin
Powered by blists - more mailing lists