Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2009 20:33:13 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192211 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200905162033.n4GKXDpI001702@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sat May 16 20:33:13 2009
New Revision: 192211
URL: http://svn.freebsd.org/changeset/base/192211

Log:
  - allow forced unmounts
  - don't assume snapshot was auto-mounted

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sat May 16 20:26:01 2009	(r192210)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sat May 16 20:33:13 2009	(r192211)
@@ -967,8 +967,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
 
 	if (fflag & MS_FORCE) {
 		/* TODO: Force unmount is not well implemented yet, so deny it. */
-		ZFS_LOG(0, "Force unmount is not supported, removing FORCE flag.");
-		fflag &= ~MS_FORCE;
+		ZFS_LOG(0, "Force unmount is experimental - report any problems.");
 	}
 
 	ret = secpolicy_fs_unmount(cr, vfsp);
@@ -1070,8 +1069,9 @@ zfs_umount(vfs_t *vfsp, int fflag)
 	if (zfsvfs->z_issnap) {
 		vnode_t *svp = vfsp->mnt_vnodecovered;
 
-		ASSERT(svp->v_count == 2);
-		VN_RELE(svp);
+		ASSERT(svp->v_count == 2 || svp->v_count == 1);
+		if (svp->v_count == 2)
+			VN_RELE(svp);
 	}
 	zfs_freevfs(vfsp);
 



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