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

From: David Howells

Date: Wed Mar 04 2026 - 09:35:11 EST


Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> > 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.

To find the next two extents of data, say, I have to make four calls into the
backing filesystem rather than one - with all the context set up and locking
those might incur.

Granted, the vast majority of files aren't sparse, so one pair of
SEEK_DATA/SEEK_HOLE should be able to establish that.

David