On Fri, 28 Dec 2007, Darren Reed wrote:

> [EMAIL PROTECTED] wrote:
>> On Thu, 27 Dec 2007, [EMAIL PROTECTED] wrote:
>> 
>>> 
>>>> 
>>>> I would guess that this is caused by different st_dev values in the new
>>>> filesystem. In such a case, mv copies the files instead of renaming them.
>>> 
>>> 
>>> No, it's because they are different filesystems and the data needs to be
>>> copied; zfs doesn't allow data movement between filesystems within a pool.
>> 
>> It's not ZFS that blocks this by design - it's the VFS framework. 
>> vn_rename() has this piece:
[ ... ]
>> ZFS will never even see such a rename request.
>
> Is this behaviour defined by a standard (such as POSIX or the
> VFS design) or are we free to innovate here and do something
> that allowed such a shortcut as required?
>
> Although I'm not sure the effort required would be worth the
> added complexity (to VFS and ZFS) for such a minor "feature".
>
> Darren

Hi Darren,

I don't think the standards would prevent us from adding "cross-fs rename" 
capabilities. It's beyond the standards as of now, and I'd expect that 
were it ever added to that it'd be an optional feature as well, to be 
queried for via e.g. pathconf().

The VFS design/framework is "ours" - the OpenSolaris community is free to 
innovate there and change it as desired. It's not on the stability level 
of the DDI. You can't revamp it at a whim, but you can change/extend it.

Precedence exists for things that FS X can do but FS Y cannot, and 
changing the framework to check "does this fs claim to support cross-fs 
rename ?" wouldn't be too hard.

A filesystem could advertise that e.g. via a VFSSW capabilities flags (the 
VSW_* stuff from <sys/vfs.h>), or via VFS features (VFSFT_*, again see 
<sys/vfs.h>, this is relatively recent, got added by the CIFS projects).

I don't know enough about ZFS internals to help you code the backend 
support, but if you wish to work on it, I'd be happy to help you with the 
framework changes. Those won't be more than ~50 lines.

"Minor feature" ? I guess that depends how you look at it. It would be 
another thing that highlights what noone else but ZFS can do for you.
Who knows what users will do with it in ten years :)

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

Reply via email to