[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <smqodjljwvhnssmq4ho3hicnomzyrpsawy65ykxhigrjl7yawu@xwtbxjamivk7>
Date: Wed, 7 Jan 2026 15:30:46 -0600
From: John Groves <John@...ves.net>
To: Miklos Szeredi <miklos@...redi.hu>,
Dan Williams <dan.j.williams@...el.com>, Bernd Schubert <bschubert@....com>,
Alison Schofield <alison.schofield@...el.com>
Cc: John Groves <jgroves@...ron.com>, Jonathan Corbet <corbet@....net>,
Vishal Verma <vishal.l.verma@...el.com>, Dave Jiang <dave.jiang@...el.com>,
Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
Alexander Viro <viro@...iv.linux.org.uk>, David Hildenbrand <david@...nel.org>,
Christian Brauner <brauner@...nel.org>, "Darrick J . Wong" <djwong@...nel.org>,
Randy Dunlap <rdunlap@...radead.org>, Jeff Layton <jlayton@...nel.org>,
Amir Goldstein <amir73il@...il.com>, Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Stefan Hajnoczi <shajnocz@...hat.com>, Joanne Koong <joannelkoong@...il.com>,
Josef Bacik <josef@...icpanda.com>, Bagas Sanjaya <bagasdotme@...il.com>,
Chen Linxuan <chenlinxuan@...ontech.com>, James Morse <james.morse@....com>, Fuad Tabba <tabba@...gle.com>,
Sean Christopherson <seanjc@...gle.com>, Shivank Garg <shivankg@....com>,
Ackerley Tng <ackerleytng@...gle.com>, Gregory Price <gourry@...rry.net>,
Aravind Ramesh <arramesh@...ron.com>, Ajay Joshi <ajayjoshi@...ron.com>, venkataravis@...ron.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, nvdimm@...ts.linux.dev,
linux-cxl@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH V3 15/21] famfs_fuse: Create files with famfs fmaps
On 26/01/07 09:33AM, John Groves wrote:
> On completion of GET_FMAP message/response, setup the full famfs
> metadata such that it's possible to handle read/write/mmap directly to
> dax. Note that the devdax_iomap plumbing is not in yet...
>
> * Add famfs_kfmap.h: in-memory structures for resolving famfs file maps
> (fmaps) to dax.
> * famfs.c: allocate, initialize and free fmaps
> * inode.c: only allow famfs mode if the fuse server has CAP_SYS_RAWIO
> * Update MAINTAINERS for the new files.
>
> Signed-off-by: John Groves <john@...ves.net>
> ---
> MAINTAINERS | 1 +
> fs/fuse/famfs.c | 355 +++++++++++++++++++++++++++++++++++++-
> fs/fuse/famfs_kfmap.h | 67 +++++++
> fs/fuse/fuse_i.h | 22 ++-
> fs/fuse/inode.c | 21 ++-
> include/uapi/linux/fuse.h | 56 ++++++
> 6 files changed, 510 insertions(+), 12 deletions(-)
> create mode 100644 fs/fuse/famfs_kfmap.h
>
[ ... ]
> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> index 9e121a1d63b7..391ead26bfa2 100644
> --- a/fs/fuse/inode.c
> +++ b/fs/fuse/inode.c
> @@ -121,7 +121,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
> fuse_inode_backing_set(fi, NULL);
>
> if (IS_ENABLED(CONFIG_FUSE_FAMFS_DAX))
> - famfs_meta_set(fi, NULL);
> + famfs_meta_init(fi);
>
> return &fi->inode;
>
> @@ -1485,8 +1485,21 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
> timeout = arg->request_timeout;
>
> if (IS_ENABLED(CONFIG_FUSE_FAMFS_DAX) &&
> - flags & FUSE_DAX_FMAP)
> - fc->famfs_iomap = 1;
> + flags & FUSE_DAX_FMAP) {
> + /* famfs_iomap is only allowed if the fuse
> + * server has CAP_SYS_RAWIO. This was checked
> + * in fuse_send_init, and FUSE_DAX_IOMAP was
> + * set in in_flags if so. Only allow enablement
> + * if we find it there. This function is
> + * normally not running in fuse server context,
> + * so we can do the capability check here...
^^^
Oops: this should be "can't" - we can't do the capability check here since we're not in
fuse server context. Will fix before merge...
[ ... ]
John
Powered by blists - more mailing lists