From 5d678ce1d8fe8114b45e96f5408cebf917e0f246 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 20 May 2018 15:17:22 -0400 Subject: cow-dedupe-range: don't enforce the 16MiB thing; the FS will do that --- lib/dedupe-range.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/dedupe-range.c') 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"); -- cgit v1.2.3-2-g168b