]> git.ipfire.org Git - thirdparty/linux.git/commit
NFS: Add support for fallocate(FALLOC_FL_ZERO_RANGE)
authorAnna Schumaker <anna.schumaker@oracle.com>
Fri, 11 Apr 2025 19:47:32 +0000 (15:47 -0400)
committerAnna Schumaker <anna.schumaker@oracle.com>
Wed, 28 May 2025 21:17:13 +0000 (17:17 -0400)
commitd2e1d783f2c619cf9d8242b67a0ab0d2915f2920
tree02f4984704ffd936beff6713ecc07be3229a990d
parent4c10fa44bc5f700e2ea21de2fbae520ba21f19d9
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: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/nfs42.h
fs/nfs/nfs42proc.c
fs/nfs/nfs42xdr.c
fs/nfs/nfs4file.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs4.h
include/linux/nfs_fs_sb.h