[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240528101152.kyvtx623djnxwonm@quack3>
Date: Tue, 28 May 2024 12:11:52 +0200
From: Jan Kara <jack@...e.cz>
To: "hch@...radead.org" <hch@...radead.org>
Cc: Trond Myklebust <trondmy@...merspace.com>,
"jack@...e.cz" <jack@...e.cz>,
"chuck.lever@...cle.com" <chuck.lever@...cle.com>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"brauner@...nel.org" <brauner@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"alex.aring@...il.com" <alex.aring@...il.com>,
"cyphar@...har.com" <cyphar@...har.com>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"jlayton@...nel.org" <jlayton@...nel.org>,
"amir73il@...il.com" <amir73il@...il.com>,
"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>
Subject: Re: [PATCH RFC v2] fhandle: expose u64 mount id to
name_to_handle_at(2)
On Mon 27-05-24 09:29:48, hch@...radead.org wrote:
> On Mon, May 27, 2024 at 03:38:40PM +0000, Trond Myklebust wrote:
> > If your use case isn't NFS servers, then what use case are you
> > targeting, and how do you expect those applications to use this API?
>
> The main user of the open by handle syscalls seems to be fanotify
> magic.
So some fanotify users may use open_by_handle_at() and name_to_handle_at()
but we specifically designed fanotify to not depend on this mount id
feature of the API (because it wasn't really usable couple of years ago
when we were designing this with Amir). fanotify returns fsid + fhandle in
its events and userspace is expected to build a mapping of fsid ->
"whatever it needs to identify a filesystem" when placing fanotify marks.
If it wants to open file / directory where events happened, then this
usually means keeping fsid -> "some open fd on fs" mapping so that it can
then use open_by_handle_at() for opening.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists