On Wed, Apr 25, 2018 at 02:37:14AM +0300, Timofey Titovets wrote: > 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
I think this patch should be split into more, there are several logical changes mixed together. I can add the patch to for-next to see if there are any problems caught by the existing test, but will expect more revisions of the patch. I don't see any fundamental problems so far. Suggested changes: * factor out __btrfs_extent_same * adjust parameters if needed by the followup patches * add the chunk counting logic * any other cleanups -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html