svn commit: r323746 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Tue Sep 19 08:43:17 UTC 2017
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.
More information about the svn-src-stable
mailing list