Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Nov 2012 13:50:08 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242567 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201211041350.qA4Do8Bs001352@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Sun Nov  4 13:50:08 2012
New Revision: 242567
URL: http://svn.freebsd.org/changeset/base/242567

Log:
  zfs_mount: drop vfs.zfs.rootpool.prefer_cached_config tunable
  
  It turned out to be not that useful, because its default value may lead
  to a problem when a root pool is present in zpool.cache, but its
  on-disk status is 'exported'.  This may happen if the pool was imported
  in a different environment with -f flag and then exported.
  
  MFC after:	12 days

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	Sun Nov  4 13:48:48 2012	(r242566)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sun Nov  4 13:50:08 2012	(r242567)
@@ -1655,24 +1655,12 @@ zfs_mount(vfs_t *vfsp)
 	if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 &&
 	    (vfsp->vfs_flag & MNT_UPDATE) == 0) {
 		char pname[MAXNAMELEN];
-		spa_t *spa;
-		int prefer_cache;
 
 		error = getpoolname(osname, pname);
+		if (error == 0)
+			error = spa_import_rootpool(pname);
 		if (error)
 			goto out;
-
-		prefer_cache = 1;
-		TUNABLE_INT_FETCH("vfs.zfs.rootpool.prefer_cached_config",
-		    &prefer_cache);
-		mutex_enter(&spa_namespace_lock);
-		spa = spa_lookup(pname);
-		mutex_exit(&spa_namespace_lock);
-		if (!prefer_cache || spa == NULL) {
-			error = spa_import_rootpool(pname);
-			if (error)
-				goto out;
-		}
 	}
 	DROP_GIANT();
 	error = zfs_domount(vfsp, osname);



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