The limit dates from when btrfs compared the two ranges itself, with
page arrays sized for the whole range. Since btrfs moved to the generic
-remap_file_range code (v4.20), the VFS compares the data one page at a
+remap_file_range code in v4.20, the VFS compares the data one page at a
time, so nothing needs the limit any more. The VFS still caps a single
request at 1 GiB. The patch removes the limit and the loop.
-One thing reviewers may want to weigh: the destination's extent range
-lock is now held for the whole request (up to 1 GiB) for the duration of
-one btrfs_clone(), instead of being dropped and retaken every 16 MiB, so
-a concurrent reader of the destination range can wait longer.
-
-Testing (misc-next lane, KASAN + lockdep): a new test,
-dedupe-maxlen-test.sh, dedupes 128 MiB, 100 MiB + 1234 bytes to EOF,
-1152 MiB (two requests, VFS cap) and a 64 MiB range inside extents in
-one call each, and checks in the committed fs tree that the destination
-has exactly one item per source extent crossed (unpatched: one per
-16 MiB), that every item shares a source extent, and that the data is
-unchanged. On the base without the patch the same test finds 8, 7, 72
-and 4 items. Details and results are in TESTING.md next to this series.
+Testing: dedupe 128 MiB, 100 MiB + 1234 bytes to EOF, 1152 MiB
+(two requests due to the VFS cap) and a 64 MiB range inside extents in
+one call each. Check in the committed fs tree that the destination
+has exactly one item per source extent crossed (instead of one per 16 MiB
+without the patch), that every item shares a source extent, and that the
+data is unchanged. On the base without the patch the same test finds 8,
+7, 72 and 4 items.
Zygo Blaxell (1):
btrfs: get rid of maximum dedupe length