rmacklem 16f6200012 Fix copy_file_range(2) so that unneeded blocks are not allocated to the output file.
When the byte range for copy_file_range(2) doesn't go to EOF on the
output file and there is a hole in the input file, a hole must be
"punched" in the output file. This is done by writing a block of bytes
all set to 0.
Without this patch, the write is done unconditionally which means that,
if the output file already has a hole in that byte range, a unneeded data block
of all 0 bytes would be allocated.
This patch adds code to check for a hole in the output file, so that it can
skip doing the write if there is already a hole in that byte range of
the output file. This avoids unnecessary allocation of blocks to the
output file.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D21155
2019-08-15 23:21:41 +00:00
..
2019-08-05 19:19:25 +00:00
2019-07-30 16:01:16 +00:00
2019-01-27 00:46:06 +00:00
2019-08-05 19:16:33 +00:00
2019-08-05 20:20:14 +00:00
2019-05-20 19:14:07 +00:00
2019-06-24 20:52:21 +00:00
2018-12-05 16:43:03 +00:00
2017-12-13 16:30:39 +00:00
2019-03-12 05:10:41 +00:00
2018-10-12 00:32:45 +00:00
2019-07-24 23:04:59 +00:00
2018-08-18 19:45:56 +00:00
2018-06-01 13:26:45 +00:00
2019-02-20 09:38:19 +00:00
2019-07-24 23:04:59 +00:00
2018-11-20 14:58:41 +00:00
2019-08-05 20:31:17 +00:00
2019-08-05 20:26:01 +00:00
2018-06-01 13:26:45 +00:00
2019-07-23 20:59:36 +00:00
2018-10-23 21:43:41 +00:00
2019-07-28 16:07:27 +00:00