Commit d2e1d783 authored by Anna Schumaker's avatar Anna Schumaker
Browse files

NFS: Add support for fallocate(FALLOC_FL_ZERO_RANGE)



This implements a suggestion from Trond that we can mimic
FALLOC_FL_ZERO_RANGE by sending a compound that first does a DEALLOCATE
to punch a hole in a file, and then an ALLOCATE to fill the hole with
zeroes. There might technically be a race here, but once the DEALLOCATE
finishes any reads from the region would return zeroes anyway, so I
don't expect it to cause problems.

Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
parent 4c10fa44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment