aboutsummaryrefslogtreecommitdiff
path: root/libexec/atf
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2024-03-15 00:35:32 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2024-03-15 00:35:32 +0000
commit89f1dcb3eb468e4cbaebd1ccde9a643d85f1282e (patch)
tree8ba90d417e36087bb08ecdbba23b7a6480061f30 /libexec/atf
parent6a6ec90681cf30eac2512ab96362a35e259fab62 (diff)
downloadsrc-89f1dcb3eb468e4cbaebd1ccde9a643d85f1282e.tar.gz
src-89f1dcb3eb468e4cbaebd1ccde9a643d85f1282e.zip
vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE
vn_generic_copy_file_range() tries to maintain holes in file ranges being copied, using SEEK_DATA/SEEK_HOLE where possible, Unfortunately SEEK_DATA/SEEK_HOLE operations can take a long time under certain circumstances. Although it is not currently possible to know if a file has unallocated data regions, the case where va_bytes >= va_size is a strong hint that there are no unallocated data regions. This hint does not work well for file systems doing compression, but since it is only a hint, it is still useful. For the case of va_bytes >= va_size, avoid doing SEEK_DATA/SEEK_HOLE. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D44509
Diffstat (limited to 'libexec/atf')
0 files changed, 0 insertions, 0 deletions