markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
795 stars 80 forks source link

Defrag while dedup #213

Open the8472 opened 5 years ago

the8472 commented 5 years ago

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.