diff options
author | Luke Shumaker <lukeshu@beefcake.parabola.nu> | 2018-05-20 15:17:22 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@beefcake.parabola.nu> | 2018-05-20 15:17:22 -0400 |
commit | 5d678ce1d8fe8114b45e96f5408cebf917e0f246 (patch) | |
tree | d70da14678ad42613e522f1a6430e3d635611fa3 /lib | |
parent | 805cc4ef8bc37858b712ac575de6d61967a6dc6f (diff) |
cow-dedupe-range: don't enforce the 16MiB thing; the FS will do that
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dedupe-range.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dedupe-range.c b/lib/dedupe-range.c index 614c9c5..c67b62c 100644 --- a/lib/dedupe-range.c +++ b/lib/dedupe-range.c @@ -58,8 +58,11 @@ void dedupe_range(uint64_t src_length, struct filepos src, struct filepos *dsts) uint64_t bytes_todo = src_length; uint64_t bytes_done = 0; while (bytes_todo > 0) { + // allegedly, these need to be aligned to the + // fundamental block size (statfs->f_frsize, + // fall back to ->f_bsize) range->src_offset = src.offset + bytes_done; - range->src_length = MIN(bytes_todo, 16*1024*1024/*16MiB*/); // XXX "silently ignore"? + range->src_length = bytes_todo; if (ioctl(src_fd, FIDEDUPERANGE, range) < 0) error(EXIT_FAILURE, errno, "FIDEDUPERANGE"); |