zfs
zfs copied to clipboard
Bring in vfs_setattr from 10a286
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.
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.
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.
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.
@lundman Eversince #594 has been merged, could this even be rolled in?