Re: Data De-duplication

Oliver Mattos
2008-12-10T21:10:37Z

On Wed, 2008-12-10 at 13:07 -0700, Anthony Roberts wrote:
> > When the a direct read
> > comparison is required before sharing blocks, it is probably best done
> > by a stand alone utility, since we don't want wait for a read of a full
> > extent every time we want to write on.
>
> Can a stand-alone utility do this without a race? Eg, if a portion of one
> of the files has already been read by the util, but is changed before the
> util has a chance to actually do the ioctl to duplicate the range.
>
> If we assume someone is keeping a hash table of "likely" matches, might it
> make sense to have a verify-and-dup ioctl that does this safely?
>

This sounds good because then a standard user could safely do this to
any file as long as he had read access to both files, but wouldn't need
write access (since the operation doesn't actually modify the file
data).