From cb2d7c85a85791923bd76d6e730efe888d456b05 Mon Sep 17 00:00:00 2001 From: pjd Date: Thu, 15 Feb 2007 22:08:35 +0000 Subject: Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method. This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs --- sys/fs/unionfs/union_vfsops.c | 8 -------- sys/fs/unionfs/union_vnops.c | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'sys/fs/unionfs') diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 53baf52..cb7b504 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -61,7 +61,6 @@ static vfs_sync_t unionfs_sync; static vfs_statfs_t unionfs_statfs; static vfs_unmount_t unionfs_unmount; static vfs_vget_t unionfs_vget; -static vfs_vptofh_t unionfs_vptofh; static vfs_extattrctl_t unionfs_extattrctl; static struct vfsops unionfs_vfsops; @@ -505,12 +504,6 @@ unionfs_checkexp(struct mount *mp, struct sockaddr *nam, int *extflagsp, } static int -unionfs_vptofh(struct vnode *vp, struct fid *fhp) -{ - return (EOPNOTSUPP); -} - -static int unionfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, int namespace, const char *attrname, struct thread *td) { @@ -542,7 +535,6 @@ static struct vfsops unionfs_vfsops = { .vfs_uninit = unionfs_uninit, .vfs_unmount = unionfs_unmount, .vfs_vget = unionfs_vget, - .vfs_vptofh = unionfs_vptofh, }; VFS_SET(unionfs_vfsops, unionfs, VFCF_LOOPBACK); diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 0e35d21..42d6dce 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -2229,6 +2229,12 @@ unionfs_setlabel(struct vop_setlabel_args *ap) return (error); } +static int +unionfs_vptofh(struct vop_vptofh_args *ap) +{ + return (EOPNOTSUPP); +} + struct vop_vector unionfs_vnodeops = { .vop_default = &default_vnodeops, @@ -2275,4 +2281,5 @@ struct vop_vector unionfs_vnodeops = { .vop_unlock = unionfs_unlock, .vop_whiteout = unionfs_whiteout, .vop_write = unionfs_write, + .vop_vptofh = unionfs_vptofh, }; -- cgit v1.1