Philip Martin wrote on Fri, Nov 12, 2010 at 11:02:14 +0000:
> Daniel Shahaf <d...@daniel.shahaf.name> writes:
> 
> > 3. What's a reasonable strategy to hotcopy the locks?
> >
> >    I've started on a patch that uses walk_digest_files() (I modified
> >    that function today), but currently that patch simply does a walk
> >    starting at the digest file md5("/"), and consequently it misses
> >    copying the unreferenced digest file md5("/trunk").
> 
> It appears you have to read/copy md5("/") and get a list of locks, then
> read/copy each lock file that still exists, then reconstruct the
> intermediate files for the locks that were copied.
> 

So, for example:

    - read md5("/")
      * read md5("/trunk/A/mu")
        + compute md5("/trunk/A")
        + compute md5("/trunk")
      * read md5("/trunk/iota")
        + compute md5("/trunk")

where the 'compute()' steps follow those of normal lock creation: read
the digest file, update list of children, write it back.

> -- 
> Philip

Reply via email to