lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250819221312.GE7942@frogsfrogsfrogs>
Date: Tue, 19 Aug 2025 15:13:12 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: John Groves <John@...ves.net>
Cc: Miklos Szeredi <miklos@...redi.hu>,
	Dan Williams <dan.j.williams@...el.com>,
	Bernd Schubert <bschubert@....com>,
	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>,
	Christian Brauner <brauner@...nel.org>,
	Randy Dunlap <rdunlap@...radead.org>,
	Jeff Layton <jlayton@...nel.org>,
	Kent Overstreet <kent.overstreet@...ux.dev>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	nvdimm@...ts.linux.dev, linux-cxl@...r.kernel.org,
	linux-fsdevel@...r.kernel.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>,
	Aravind Ramesh <arramesh@...ron.com>,
	Ajay Joshi <ajayjoshi@...ron.com>
Subject: Re: [RFC V2 12/18] famfs_fuse: Plumb the GET_FMAP message/response

On Fri, Aug 15, 2025 at 11:53:16AM -0500, John Groves wrote:
> On 25/08/14 04:36PM, Miklos Szeredi wrote:
> > On Thu, 14 Aug 2025 at 15:36, Miklos Szeredi <miklos@...redi.hu> wrote:
> > 
> > > I'm still hoping some common ground would benefit both interfaces.
> > > Just not sure what it should be.
> > 
> > Something very high level:
> > 
> >  - allow several map formats: say a plain one with a list of extents
> > and a famfs one
> >  - allow several types of backing files: say regular and dax dev
> >  - querying maps has a common protocol, format of maps is opaque to this
> >  - maps are cached by a common facility
> >  - each type of mapping has a decoder module
> >  - each type of backing file has a module for handling I/O
> > 
> > Does this make sense?
> > 
> > This doesn't have to be implemented in one go, but for example
> > GET_FMAP could be renamed to GET_READ_MAP with an added offset and
> > size parameter.  For famfs the offset/size would be set to zero/inf.
> > I'd be content with that for now.
> 
> Maybe GET_FILE_MAP or GET_FILE_IOMAP if we want to keep overloading 
> the term iomap. Maps are to backing-dev for regular file systems,
> and to device memory (devdax) for famfs - in all cases both read
> and write (when write is allowed).

The calling model for fuse-iomap is the same as fs/iomap -- there's an
IOMAP_BEGIN upcall to get a mapping from the filesystem, and an
IOMAP_END upcall to tell the fuse server whatever it did with the
mapping.  Some filesystems will reserve delayed allocation reservations
in iomap_begin for a pagecache write, and need to cancel those
reservations if the write fails.

For a pagecache write you need both a read and a write mapping because
the caller's file range isn't guaranteed to be fsblock-aligned.  famfs
mappings are a subcase of iomappings -- the read & write mappings are
the same, and they're always FUSE_IOMAP_TYPE_MAPPED.

IOWs, I don't want "GET_FILE_IOMAP" because that's not how iomap works.
(There's a separate FUSE_IOMAP_IOEND to pass along IO completions from
storage)

Given that famfs just calls dax_iomap_rw with an iomap_ops struct, I
seriously wonder if I should just wire up fsdax for RFC v5 and then
let's see how much code famfs actually needs on top of that.

--D

> Thanks,
> John
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ