freebsd-dev/sys
Rick Macklem 4f592683c3 copy_file_range(2): improve copying of a large hole to EOF
PR#255523 reported that a file copy for a file with a large hole
to EOF on ZFS ran slowly over NFSv4.2.
The problem was that vn_generic_copy_file_range() would
loop around reading the hole's data and then see it is all
0s. It was coded this way since UFS always allocates a data
block near the end of the file, such that a hole to EOF never exists.

This patch modifies vn_generic_copy_file_range() to check for a
ENXIO returned from VOP_IOCTL(..FIOSEEKDATA..) and handle that
case as a hole to EOF. asomers@ confirms that it works for his
ZFS test case.

PR:	255523
Tested by:	asomers
Reviewed by:	asomers
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D30076
2021-05-02 16:04:27 -07:00
..
amd64 Switch the EFI virtual address to a uint64_t 2021-05-01 06:01:20 +00:00
arm Switch the EFI virtual address to a uint64_t 2021-05-01 06:01:20 +00:00
arm64 Enable IPIs on CPU 0 on arm and arm64 2021-05-02 07:43:34 +00:00
bsm Add aio_writev and aio_readv 2021-01-02 19:57:58 -07:00
cam mmccam: probe*: Style(9) 2021-04-27 19:03:16 +02:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat linuxkpi: Introduce tasklet_disable_nosync() 2021-04-28 08:05:57 -07:00
conf riscv: Remove old qemu compatibility code 2021-04-27 16:22:04 -05:00
contrib zfs: restore copyright disclaimer change from 4b84b4cca 2021-04-26 22:16:50 +02:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
dev Switch the EFI virtual address to a uint64_t 2021-05-01 06:01:20 +00:00
dts dts: Bump the freebsd branding version to 5.10 2021-03-23 15:02:21 +01:00
fs nfscl: add check for NULL clp and forced dismounts to nfscl_delegreturnvp() 2021-04-27 17:30:16 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmirror: Pre-allocate the timeout event structure 2021-03-11 15:45:15 -05:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 Create VM_MEMATTR_DEVICE on all architectures 2021-04-12 06:15:31 +00:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern copy_file_range(2): improve copying of a large hole to EOF 2021-05-02 16:04:27 -07:00
kgssapi opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
libkern x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
mips OCF: Remove support for asymmetric cryptographic operations. 2021-04-12 14:28:43 -07:00
modules modules: remove stale if_wg reference 2021-04-15 19:59:13 -05:00
net iflib: Take iri_pad into account when processing small frames 2021-04-30 12:46:17 +02:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph ng_ubt: Block attachment of uninitialized Intel Wireless 7265 2021-04-15 17:26:32 +03:00
netinet sctp: update the vtag for INIT and INIT-ACK chunks 2021-04-30 13:33:16 +02:00
netinet6 Re-enable network ioctls in capability mode 2021-04-23 09:22:49 -04:00
netipsec Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." 2021-02-08 22:32:32 +00:00
netpfil pf: Fix IP checksum on reassembly 2021-04-30 08:19:46 +02:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed LinuxKPI/OFED: (re)move inetdevice.h implementation 2021-03-30 14:40:46 +00:00
opencrypto OCF: Remove support for asymmetric cryptographic operations. 2021-04-12 14:28:43 -07:00
powerpc powerpc/xive: Remove POWER9 DD1 IRQ bits 2021-05-01 16:18:02 -05:00
riscv riscv: Remove old qemu compatibility code 2021-04-27 16:22:04 -05:00
rpc nfsd: fix a NFSv4.1 Linux client mount stuck in CLOSE_WAIT 2021-04-27 15:32:35 -07:00
security tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets 2021-04-12 08:25:31 -07:00
sys Switch the EFI virtual address to a uint64_t 2021-05-01 06:01:20 +00:00
teken loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
tests Add IPv4 fib lookup performance tests with uniform keys. 2021-03-30 14:32:28 +01:00
tools newbus: remove support for SINGLETON 2021-04-26 11:41:08 -06:00
ufs b_vflags update requries bufobj lock 2021-04-15 15:47:42 +03:00
vm sysctl vm.objects: report backing object and swap use 2021-04-19 21:32:01 +03:00
x86 Wait longer for a previous IPI to be sent 2021-04-30 13:32:29 -05:00
xdr
xen xen: move x86-specific xen_vector_callback_enabled to sys/x86 2021-03-15 14:20:21 +01:00
Makefile