Am 23.05.25 um 18:27 schrieb Eric Blake: > Fiona reported that ZFS makes sparse file testing awkward, since: > - it has asynchronous allocation (not even 'fsync $file' makes du see > the desired size; it takes the slower 'fsync -f $file' which is not > appropriate for the tests) > - for tests of fully allocated files, ZFS with compression enabled > still reports smaller disk usage > > Add a new _require_sparse_file that quickly probes whether an attempt
It's called _require_disk_usage in the implementation. > to create a sparse 5M file shows as less than 1M usage, while the same > file with -o preallocation=full shows as more than 4M usage without > sync, which should filter out ZFS behavior. Then use it in various > affected tests. > > This does not add the new filter on all tests that Fiona is seeing ZFS > failures on, but only those where I could quickly spot that there is > at least one place where the test depends on the output of 'du -b' or > 'stat -c %b'. > > Reported-by: Fiona Ebner <f.eb...@proxmox.com> > Signed-off-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Fiona Ebner <f.eb...@proxmox.com> Tested-by: Fiona Ebner <f.eb...@proxmox.com>