Joerg Schilling wrote:
Jonathan Edwards <[EMAIL PROTECTED]> wrote:
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

More concise way of putting what I'm saying. Traditional mv between two fs will create two copies of the data, if the source file is open. At a minimum, this will have to be emulated or things will break. Since zfs file systems are really different Unix file systems, we have to deal with the semantics. It's not just a path change as in a directory mv.

Jon

--


-     _____/     _____/      /           - Jonathan Loran -           -
-    /          /           /                IT Manager               -
-  _____  /   _____  /     /     Space Sciences Laboratory, UC Berkeley
-        /          /     /      (510) 643-5146 [EMAIL PROTECTED]
- ______/    ______/    ______/           AST:7731^29u18e3

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to