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/gnu/fs/reiserfs/reiserfs_vfsops.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'sys/gnu/fs/reiserfs/reiserfs_vfsops.c') diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c index 4ace2da..e947379 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c @@ -26,7 +26,6 @@ static vfs_mount_t reiserfs_mount; static vfs_root_t reiserfs_root; static vfs_statfs_t reiserfs_statfs; static vfs_unmount_t reiserfs_unmount; -static vfs_vptofh_t reiserfs_vptofh; static int reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td); @@ -377,30 +376,6 @@ reiserfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) return (0); } -/* - * Vnode pointer to File handle - */ -static int -reiserfs_vptofh(struct vnode *vp, struct fid *fhp) -{ - struct rfid *rfhp; - struct reiserfs_node *ip; - - ip = VTOI(vp); - reiserfs_log(LOG_DEBUG, - "fill *fhp with inode (dirid=%d, objectid=%d)\n", - ip->i_ino, ip->i_number); - - rfhp = (struct rfid *)fhp; - rfhp->rfid_len = sizeof(struct rfid); - rfhp->rfid_dirid = ip->i_ino; - rfhp->rfid_objectid = ip->i_number; - rfhp->rfid_gen = ip->i_generation; - - reiserfs_log(LOG_DEBUG, "return it\n"); - return (0); -} - /* ------------------------------------------------------------------- * Functions for the journal * -------------------------------------------------------------------*/ @@ -1180,7 +1155,6 @@ static struct vfsops reiser_vfsops = { .vfs_statfs = reiserfs_statfs, //.vfs_sync = reiserfs_sync, //.vfs_vget = reiserfs_vget, - .vfs_vptofh = reiserfs_vptofh, }; VFS_SET(reiser_vfsops, reiserfs, VFCF_READONLY); -- cgit v1.1