cross-device copying / USB improvements

benny listen at marcrenearns.de
Sat Jul 26 04:43:13 PDT 2008


benny wrote:

> benny wrote:
> 
>> -> cp resumes. i.e. starts copying the same things again, this time
>>    behaving like rsync (I guess rsync solves incomplete transfers by
>>    some kind of checksum / hashing)
> perhaps this one is not so far away :)
> lets say the fs on both devices is hammer, then a cp could be thought of
> as a simple mirroring (syncing) (and a mv as a cp with deletion on the
> source). the only thing needed would be to be able to "mirror" a single
> file and to "detach" the mirrored file / directory somehow from the
> master. 
maybe a normal cross-device hammer-to-hammer cp could then be done like
this:
- create a pseudo fs on the target (marked with a special delete-me flag)
- sync the pseudo fs with the source
- transform it *somehow* into a regular entry (no pseudofs any longer)
- remove the special delete-me flag

if any interruption occurs, we got a pseudo fs entry with a special
delete-me flag that doesn't show up in normal operations and could be
removed by normal pruning

if the copying can be resumed, it would continue the mirroring until its
done

maybe single files could be handled on the target the same way
(pseudofs-root would be the filename and have some special flag an the file
in it)

just some food for thinking...I am sure you would come up with better
solutions..

benny




> I don't know if it is possible to extend hammer that way though. 
> 
> For other filesystems an rsync something would still be needed, but this
> could be a start.
> 
> Regards,
> Benny

-- 
---------------------------------------------------------------------------------------------------






More information about the Bugs mailing list