Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
9223372036854775807
Description
After LU-10810 the osd-zfs has support for SEEK_HOLE/DATA but with no access to ZFS dmu_offset_next() function yet. So we had no check how it works actually with ZFS.
With latest ZFS 8.5 this was solved and I am able to run lseek tests on ZFS.
This reveals several problems with ZFS support for SEEK_HOLE/DATA
1. Results for files with dirty data are unreliable, it can be that some offset is reported as HOLE and immediate SEEK_DATA for the same offset finds dirty data, switches to generic approach and reports DATA. This problem exists mostly because HOLE lseek doesn't check if data is dirty like SEEK_DATA does, so HOLE can be reported correctly even with dirty data
Solution is data sync and repeat lseek, or don't report that osd-zfs as supporting SEEK_DATA/HOLE, we cannot accept unreliable results while using SEEK_HOLE/DATA in our tools, especially where data is copied.
2. Current tests doesn't fit well with ZFS bigger block sizes, so either tests should be properly updated to check ZFS big blocksize and uses appropriate offsets or skip tests if blocksize is too big for reliable results.
Attachments
Issue Links
- is related to
-
LU-10810 SEEK_HOLE and SEEK_DATA support for lseek
- Resolved