Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2009 06:05:55 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r192186 - user/kmacy/ZFS_MFC/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200905160605.n4G65uHY046382@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sat May 16 06:05:55 2009
New Revision: 192186
URL: http://svn.freebsd.org/changeset/base/192186

Log:
  - pass flags through to vn_lock
  - ifdef out incorrect assert
  - only adjust vnodes once

Modified:
  user/kmacy/ZFS_MFC/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

Modified: user/kmacy/ZFS_MFC/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- user/kmacy/ZFS_MFC/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sat May 16 05:14:36 2009	(r192185)
+++ user/kmacy/ZFS_MFC/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sat May 16 06:05:55 2009	(r192186)
@@ -860,7 +860,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t
 	error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp);
 	if (error == 0) {
 		*vpp = ZTOV(rootzp);
-		error = vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
+		error = vn_lock(*vpp, flags, td);
 		(*vpp)->v_vflag |= VV_ROOT;
 	}
 
@@ -1078,7 +1078,13 @@ zfs_umount(vfs_t *vfsp, int fflag, kthre
 	if (zfsvfs->z_issnap) {
 		vnode_t *svp = vfsp->mnt_vnodecovered;
 
+#if 0
+		/*
+		 * I believe that this is incorrect for the
+		 * case of manually mounted snapshots
+		 */
 		ASSERT(svp->v_count == 2);
+#endif		
 		VN_RELE(svp);
 	}
 	zfs_freevfs(vfsp);
@@ -1103,7 +1109,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla
 		*vpp = NULL;
 	else {
 		*vpp = ZTOV(zp);
-		vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread);
+		vn_lock(*vpp, flags, curthread);
 	}
 	ZFS_EXIT(zfsvfs);
 	return (err);
@@ -1337,13 +1343,6 @@ zfs_init(void)
 	 * ZFS/i386.
 	 */
 	zfs_vnodes_adjust();
-
-	/*
-	 * Reduce number of vnodes. Originally number of vnodes is calculated
-	 * with UFS inode in mind. We reduce it here, because it's too big for
-	 * ZFS/i386.
-	 */
-	zfs_vnodes_adjust();
 }
 
 void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905160605.n4G65uHY046382>