I would suggest taking a version of approach (1), myself.

Rather than special-casing ZFS, we could issue a VOP_CROSS_RENAME (or some such 
call) if the source and destination directory were on different file systems 
implemented by the same filesystem module. If this returned failure (e.g. the 
ENOSYS likely to be returned by file systems which do not implement this new 
VOP), the rename would fail as it does today, and mv would perform its 
copy/delete sequence instead. (Why a new VOP? Compatibility with existing file 
systems which may assume that rename has already performed the same file system 
check.)

I would recommend this because it's more general. For instance, Apple's AFP 
protocol allows a file to be renamed/moved from one mounted file system to 
another if both are on the same file server. This allows a large file to be 
moved without having it cross the network twice. I think that CIFS may have the 
same functionality. This would allow VFS modules implementing those to expose 
the function to Solaris.
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to