Date: Tue, 19 Sep 2017 08:43:45 +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-10@freebsd.org Subject: svn commit: r323747 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201709190843.v8J8hjl6042775@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Tue Sep 19 08:43:45 2017 New Revision: 323747 URL: https://svnweb.freebsd.org/changeset/base/323747 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/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:16 2017 (r323746) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:45 2017 (r323747) @@ -4179,6 +4179,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.v8J8hjl6042775>