zfs icon indicating copy to clipboard operation
zfs copied to clipboard

Bring in vfs_setattr from 10a286

Open lundman opened this issue 10 years ago • 4 comments

We don't really need it, but it could be nice for users to be able to rename by clicking on the volume name, and the source has already been made.

https://github.com/roddi/maczfs-10a286/blob/master/src/uts/common/fs/zfs/zfs_vfsops.c#L1424

And do testing to make sure it works, rename, unmount, stat, Finder etc.

lundman avatar Jan 30 '15 02:01 lundman

There is some new way to accomplish the same thing. vfs_setattr was deprecated after 10.5 so it makes no sense to use it.

ilovezfs avatar Jan 30 '15 03:01 ilovezfs

Ah I see. They just made vfs_setattr itself private. But since we set VOL_CAP_INT_VOL_RENAME and VOL_CAP_INT_ATTRLIST, setattrlist, which is not private or deprecated, still ultimately will use our own vfs setattr op if we had one. Cool.

ilovezfs avatar Jan 30 '15 04:01 ilovezfs

Right now the volume name is not a separate property and is set equal to the basename of the mountpoint property. Since the mountpoint can be customized in ZFS and be entirely unrelated to the dataset name, I don't see how it would make sense to trigger zfs rename of the dataset. We could set volume name equal to the basename of the full dataset name instead of the basename of the mountpoint path, and then zfs rename could make sense. However, there is no reason to think users always want the displayed volume name in Finder to be the same as the dataset basename. Therefore, I think we will probably want to maintain a separate zfs property for volume name, which is modifiable from Finder but does not trigger a zfs rename.

ilovezfs avatar Jan 30 '15 05:01 ilovezfs

@lundman Eversince #594 has been merged, could this even be rolled in?

JMoVS avatar Oct 06 '19 21:10 JMoVS