Date: Tue, 19 Sep 2017 08:43:16 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323746 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201709190843.v8J8hG8x042700@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Tue Sep 19 08:43:16 2017 New Revision: 323746 URL: https://svnweb.freebsd.org/changeset/base/323746 Log: MFC r321471: spa_import_rootpool should be able to handle an imported root pool That is required to support reboot -r with a new root filesystem being on an already imported pool. PR: 210721 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:39:54 2017 (r323745) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:16 2017 (r323746) @@ -4275,6 +4275,16 @@ spa_import_rootpool(const char *name) if ((spa = spa_lookup(pname)) != NULL) { /* + * The pool could already be imported, + * e.g., after reboot -r. + */ + if (spa->spa_state == POOL_STATE_ACTIVE) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); + return (0); + } + + /* * Remove the existing root pool from the namespace so * that we can replace it with the correct config * we just read in.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709190843.v8J8hG8x042700>