On Wed, Jun 13, 2018 at 01:52:03AM +0200, Mark Fasheh wrote: > > > > So, you are saying iomap implementation violates FIEMAP specs? > > Does iomap do this or just XFS? At any rate, the doc should be read > as Ted suggests: '"Extents returned mirror those on disk" as meaning > that the ext4 behavior is *mandated* by the docs.' > > So anything that's mainipulating the returned extents solely to > 'fit' them into a request is wrong. Well, or the FIEMAP specs could be changed. If I recall correctly the FIEMAP implementation by the various file systems predates the documentation. I suspect whoever wrote the docs looked at the ext2/ext3/ext4 implementation and used that to write the documentation. If other file systems were doing something else, I'd be in favor of allowing either behavior, since userspace programs who care will need to accomodate either behavior. Fortunately, I suspect it matters for very few (if any) userspace programs. - Ted