Re: Data Deduplication with the help of an online filesystem check

Chris Mason
2009-04-27T13:37:28Z

On Mon, 2009-04-27 at 05:33 +0200, Thomas Glanzmann wrote:
> Hello,
> I would like to know if it would be possible to implement the following
> feature in btrfs:
>
> Have an online filesystem check which accounts for possible duplicated
> data blocks (maybe with the help of already implemented checksums: Are
> these checksums for the whole file or block based?) and de duplicate
> these blocks?

There is a btrfs ioctl to clone individual files, and this could be used
to implement an online dedup. But, since it is happening from userland,
you can't lock out all of the other users of a given file.

So, the dedup application would be responsible for making sure a given
file was not being changed while the dedup scan was running.

-chris