Skip to content

Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction

Timofey Titovets linux-btrfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v21 patch 1 replySuperseded
  3. v1 RFC1 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- Split to several patches

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Btrfs: split btrfs_extent_same() for simplificationfs/btrfs/ioctl.c+35 -290 replies
2/3Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restrictionfs/btrfs/ioctl.c+19 -60 replies
3/3Btrfs: btrfs_extent_same() reuse cmp workspacefs/btrfs/ioctl.c+41 -390 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/3] Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction

At now btrfs_dedupe_file_range() restricted to 16MiB range for limit locking time and memory requirement for dedup ioctl()

For too big input range code silently set range to 16MiB

Let's remove that restriction by do iterating over dedup range. That's backward compatible and will not change anything for request less then 16MiB.

Changes:
v1 -> v2:
- Refactor btrfs_cmp_data_prepare and btrfs_extent_same
- Store memory of pages array between iterations
- Lock inodes once, not on each iteration
- Small inplace cleanups
v2 -> v3:
- Split to several patches

Timofey Titovets (3):
Btrfs: split btrfs_extent_same() for simplification
Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction
Btrfs: btrfs_extent_same() reuse cmp workspace

 fs/btrfs/ioctl.c | 161 ++++++++++++++++++++++++++---------------------
 1 file changed, 91 insertions(+), 70 deletions(-)
Signature · 1 line
2.17.0