[Bug 256205] lseek() with SEEK_HOLE some times wrongly reports holes on ZFS

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 31 May 2021 15:50:18 UTC

--- Comment #11 from Alan Somers <asomers@FreeBSD.org> ---
Now we're getting somewhere.

* zdb shows a file that is completely sparse; it contains no data
* nullfs is involved.

Maybe your newly written file is getting cached by nullfs in the VM cache and
not flushed to ZFS until "some hours of letting the FS idle".  And maybe nullfs
forwards the FIOSEEKHOLE ioctl to ZFS without first flushing the file.  That
would explain why you're getting bad results.

To test this theory, try writing the bad file again, then do "fsync
<path/to/file>" and then examine it with zdb and star.  If it's dense, then
that supports my theory.

You are receiving this mail because:
You are the assignee for the bug.