[RFC PATCH 02/17] vfs: Implement a FIEMAP callback
Christoph Hellwig
hch at infradead.org
Wed Mar 4 06:25:50 PST 2026
On Wed, Mar 04, 2026 at 02:21:54PM +0000, David Howells wrote:
> 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?
Yes. Why do you even want to move away from that? It's the far
better API. Of course like all other reporting APIs it still is
racy, but has far less problems than fiemap.
More information about the linux-afs
mailing list