[Xapian-tickets] [Xapian] #823: Unit test ioblock1 failure
Xapian
nobody at xapian.org
Thu Dec 21 15:57:15 GMT 2023
#823: Unit test ioblock1 failure
--------------------------+-------------------------------
Reporter: someplaceguy | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone: 1.4.25
Component: Test Suite | Version: 1.4.24
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: Linux
--------------------------+-------------------------------
Comment (by someplaceguy):
Unfortunately the accuracy/timeliness of `st_blocks` seems to be a bit of
a complicated issue in ZFS.
Perhaps the best course of action would be to perform 2 tests for
sparsity:
1) The first test would follow the suggestion of the ZFS developer to use
lseek(SEEK_DATA/SEEK_HOLE) to figure out whether the file has holes or not
(i.e. indicating that it is sparse). This would work for ZFS and all other
filesystems that implement this interface.
2) However, some filesystems might not implement this interface and
instead they might claim that the entire file is a non-hole even though
they do support sparse files. As a fallback, a second test would be
performed, using `st_blocks` like Xapian currently does.
This should probably be robust enough to work in almost all cases.
--
Ticket URL: <https://trac.xapian.org/ticket/823#comment:4>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list