Since btrfs defrag breaks reflinks it would be great if defragmentation could be done during deduplication. I.e. the target extent(s) could be treated with defrag_range, then the other extents could deduplicated with the newly defragmented one.
Doing dedup and defrag separately leaves no control which extents duperemove will choose as target and would also require much more space since the whole filesystem could have its reflinks temporarily broken.
Since
btrfs defrag
breaks reflinks it would be great if defragmentation could be done during deduplication. I.e. the target extent(s) could be treated withdefrag_range
, then the other extents could deduplicated with the newly defragmented one.Doing dedup and defrag separately leaves no control which extents duperemove will choose as target and would also require much more space since the whole filesystem could have its reflinks temporarily broken.