3. De-de-duplicate blocks on disk, i.e. copy them on write
I suppose that de-duplication itself would be done by some user space
process that would scan files, determine blocks with the same data and
then de-duplicate them by using syscall or IOCTL (2).
That would be very usable feature, which in most cases would allow to
shrink occupied disk space on 50-90%.
Have you references for this number?
In my experience one gets a lot of benefit from
the much simpler process of "de-duplication" of files.
Yes, I would expect simple hard links to be a better solution for this,
but the feature request is not that out of line. I actually had plans
on implementing auto duplicate block reuse earlier in btrfs.