Jonathan Edwards <[EMAIL PROTECTED]> wrote:

>
> On Dec 29, 2007, at 2:33 AM, Jonathan Loran wrote:
>
> > Hey, here's an idea:  We snapshot the file as it exists at the time of
> > the mv in the old file system until all referring file handles are
> > closed, then destroy the single file snap.  I know, not easy to
> > implement, but that is the correct behavior, I believe.
> >
> > All this said, I would love to have this "feature" introduced.  Moving
> > large file stores between zfs file systems would be so handy!  From my
> > own sloppiness, I've suffered dearly from the the lack of it.
>
> since in the current implementation a mv between filesystems would  
> have to assign new st_ino values (fsids in NFS should also be  
> different), all you should need to do is assign new block pointers in  
> the new side of the filesystem .. that would also be handy for cp as  
> well

If the rename would keep the blocks from the old file for the new name
then the new file would inherit the identity of the old file.

If you did iplement the rename in a way that would cause new values for
st_dev/st_ino to be returned from a fstat(2) cal then this could confuse 
programs.

If you instead set st_nlink for the open file to 0, then this would be OK 
from the viewpoint of the old file but not be OK from the view to the whole 
system. How would you implement writes into the open fd from the old name?

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to