[RFC PATCH 02/17] vfs: Implement a FIEMAP callback

David Howells dhowells at redhat.com
Wed Mar 4 06:21:54 PST 2026


Christoph Hellwig <hch at infradead.org> wrote:

> On Wed, Mar 04, 2026 at 02:03:09PM +0000, David Howells wrote:
> > Implement a callback in the internal kernel FIEMAP API so that kernel users
> > can make use of it as the filler function expects to write to userspace.
> > This allows the FIEMAP data to be captured and parsed.  This is useful for
> > cachefiles and also potentially for knfsd and ksmbd to implement their
> > equivalents of FIEMAP remotely rather than using SEEK_DATA/SEEK_HOLE.
> 
> Hell no.  FIEMAP is purely a debugging toool and must not get anywhere
> near a data path.  NAK to all of this.

So I have to stick with SEEK_DATA/SEEK_HOLE for this?

(Before you ask, yes, I do want to keep track of this myself, but working out
the best way to do that without reinventing the filesystem is the issue -
well, that and finding time to do it).

David




More information about the linux-afs mailing list