FreeBSD src
Go to file
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
.github/workflows Enable GitHub actions CI for stable/13 as well 2021-04-20 09:51:33 +01:00
bin sh: fix debug build 2021-04-11 09:23:14 +02:00
cddl dtrace tests: Fix tst.system.d after ping/ping6 unification 2021-04-23 10:28:09 -04:00
contrib less: upgrade to v581.2. 2021-05-01 23:16:08 -07:00
crypto Revert "Add workaround for a QoS-related bug in VMWare Workstation." 2021-04-25 17:17:22 -04:00
etc base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
gnu dialog: fix macro redefinition 2021-03-01 16:01:44 +01:00
include Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
kerberos5 kerberos5: fix the WITH_OPENLDAP build 2021-01-30 00:07:50 -06:00
lib connectat(2): clarify that the s argument is socket 2021-04-30 17:43:45 +03:00
libexec rc: remove the 'addswap' script. 2021-04-26 10:22:47 +01:00
release arm: add a release conf for distribution files 2021-04-29 10:10:08 -03:00
rescue ping: add a ping6 hard link for backwards compatibility 2020-11-26 18:33:04 +00:00
sbin sbin/ipfw: Fix null pointer deference when printing counters 2021-05-02 21:28:46 +02:00
secure Revert "Add workaround for a QoS-related bug in VMWare Workstation." 2021-04-25 17:17:22 -04:00
share Add myself (vishwin) as a ports committer 2021-05-02 10:20:46 -04:00
stand EFI secure boot VECTX related changes 2021-04-30 12:53:45 -05:00
sys copy_file_range(2): improve copying of a large hole to EOF 2021-05-02 16:04:27 -07:00
targets Remove kgmon(8) 2021-04-04 00:50:28 +03:00
tests pf tests: Test scrub fragment reassemble on interfaces with different MTU 2021-04-30 08:19:47 +02:00
tools Update tools/regression/poll/sockpoll.c for POLLRDPOLL. 2021-04-28 23:15:39 +12:00
usr.bin usr.bin/netstat: use roundup2 when rounding up to power of 2. 2021-05-02 09:30:22 -07:00
usr.sbin pkg(7): replace usage of sbuf(9) with open_memstream(3) 2021-04-29 06:41:59 +02:00
.arcconfig Remove history.immutable from .arcconfig 2021-04-13 12:36:25 +01:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml Cirrus-CI: use FreeBSD 13.0 image for base system CI build 2021-04-19 15:23:14 -04:00
.clang-format clang-format: Avoid breaking after the opening paren of function definitions 2020-10-28 11:54:00 +00:00
.gitattributes Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
.gitignore Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS LOCKS: update current locks 2018-06-09 03:08:04 +00:00
MAINTAINERS Add a pointer to csprng@ for the CSPRNG driver. This is enforced anyway by 2020-09-01 08:02:12 +00:00
Makefile Fix 'make bmake' top-level bootstrapping. 2021-03-06 09:45:08 -08:00
Makefile.inc1 Makefile.inc1: unbreak bootstrap when kbdcontrol does not exist 2021-03-23 20:47:14 -04:00
Makefile.libcompat libcompat: remove redundant path for ncurses 2021-01-07 15:14:52 +01:00
Makefile.sys.inc AUTO_OBJ: For all top-level targets enforce using an OBJDIR. 2017-12-05 21:29:47 +00:00
ObsoleteFiles.inc rc: remove the 'addswap' script. 2021-04-26 10:22:47 +01:00
README.md Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
RELNOTES Spellcheck. 2021-04-12 15:12:19 -07:00
UPDATING UPDATING: add an entry for commit 8759773148 2021-04-26 16:47:15 -07:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Various commands and libraries under the GNU Public License. Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources.
sys/arch/conf Kernel configuration files. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries.
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.