[LU-14217] better SEEK_HOLE/DATA support in OSD-ZFS Created: 15/Dec/20  Updated: 22/Jul/21  Resolved: 22/Jul/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.15.0

Type: Improvement Priority: Major
Reporter: Mikhail Pershin Assignee: Mikhail Pershin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-10810 SEEK_HOLE and SEEK_DATA support for l... Resolved
Rank (Obsolete): 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.



 Comments   
Comment by Gerrit Updater [ 15/Dec/20 ]

Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40970
Subject: LU-14217 osd-zfs: allow SEEK_HOLE/DATA only with sync
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2fe91608147021874782a9ed49396f31f981d391

Comment by Gerrit Updater [ 22/Jul/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40970/
Subject: LU-14217 osd-zfs: allow SEEK_HOLE/DATA only with sync
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a3f5aa624b83307caf56ca6d2490040f6e9cf2fc

Comment by Peter Jones [ 22/Jul/21 ]

Landed for 2.15

Generated at Sat Feb 10 03:07:51 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.