wellbehavedsoftware / btrfs-dedupe

MIT License
31 stars 5 forks source link

Is defragmentation actually a good idea? #2

Open darkbasic opened 6 years ago

darkbasic commented 6 years ago

Defragmenting a file which has a COW copy (either a snapshot copy or one made with cp --reflink or bcp) plus using the -c switch with a compression algorithm may result in two unrelated files effectively increasing the disk usage.

pklapperich commented 4 years ago

This is only true of some kernel versions. See the btrfs wiki

Zygo commented 4 years ago

All of the kernel versions which do not break reflinks in defrag are so old that they are missing the necessary ioctl for dedupe.