On Tue, 2009-04-28 at 17:49 +0400, Andrey Kuzmin wrote: > On Tue, Apr 28, 2009 at 2:02 PM, Chris Mason <chris.ma...@oracle.com> wrote: > > On Tue, 2009-04-28 at 07:22 +0200, Thomas Glanzmann wrote: > >> Hello Chris, > >> > >> > 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. > >> > >> I see, does that mean that I can not do ,,dedup'' for files that are > >> currently opened by a userland program? > > > > No, but it does mean the dedup done from userland is racey. Picture > > Race disappears if (background) dedupe is run against snapshot(s). >
True, but then you're only changing the blocks pointed to by the snapshot. The 'master' copy still points to the unduplicated blocks. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html