Bug 1301332

Summary: improve sparse file handling by supporting SEEK_HOLE / SEEK_DATA
Product: [Retired] nfs-ganesha Reporter: Niels de Vos <ndevos>
Component: FSAL_GLUSTERAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jthottan, kkeithle, pasik
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-24 11:18:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1220173    
Bug Blocks:    

Description Niels de Vos 2016-01-24 10:20:24 UTC
Description of problem:
NFSv4 supports SEEK_HOLE and SEEK_DATA and this can improve the handling of sparse files (like virtual machine images) a lot. Gluster is going to support this soon too, see bug 1220173 for more details.

Steps to Reproduce:
1. create a sparse file on a NFSv4 mountpoint (use 'qemu-img')
2. copy the sparse file from the NFSv4 mount to somewhere (use 'cp')
3. compare the allocated space of the two files

Actual results:
The copy is fully allocated.

Expected results:
The copy should have holes as well.

Comment 1 Pasi Karkkainen 2018-08-31 13:57:11 UTC
Does nfs-ganesha support SEEK_HOLE / SEEK_DATA these days? 
Those features are part of NFSv4.2 protocol standard.

Comment 2 Jiffin 2018-09-05 03:39:45 UTC
The support was added in 2.7 branch(current devel branch) https://review.gerrithub.io/#/c/ffilz/nfs-ganesha/+/393642/. But not available in stable releases.

Comment 3 Pasi Karkkainen 2018-09-05 06:37:16 UTC
Great, thanks!

Comment 4 Kaleb KEITHLEY 2020-06-24 11:18:45 UTC
If this is still an issue please open an issue in the github tracker at https://github.com/nfs-ganesha/nfs-ganesha/issues