From owner-svn-src-head@FreeBSD.ORG Sun Nov 4 13:50:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2EA36F4; Sun, 4 Nov 2012 13:50:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA7798FC08; Sun, 4 Nov 2012 13:50:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA4Do8TX001354; Sun, 4 Nov 2012 13:50:08 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA4Do8Bs001352; Sun, 4 Nov 2012 13:50:08 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201211041350.qA4Do8Bs001352@svn.freebsd.org> From: Andriy Gapon Date: Sun, 4 Nov 2012 13:50:08 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2012 13:50:09 -0000 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);