svn commit: r243501 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Sat Nov 24 13:16:49 UTC 2012
Author: avg
Date: Sat Nov 24 13:16:49 2012
New Revision: 243501
URL: http://svnweb.freebsd.org/changeset/base/243501
Log:
spa_import_rootpool: initialize ub_version before calling spa_config_parse
... because the latter makes some decision based on the version.
This is especially important for raidz vdevs.
This is similar to what spa_load does.
This is not an issue for upstream because they do not seem to support
using raidz as a root pool.
Reported by: Andrei Lavreniyuk <andy.lavr at gmail.com>
Tested by: Andrei Lavreniyuk <andy.lavr at gmail.com>
MFC after: 6 days
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Nov 24 13:14:53 2012 (r243500)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Nov 24 13:16:49 2012 (r243501)
@@ -3838,6 +3838,14 @@ spa_import_rootpool(const char *name)
spa_remove(spa);
}
spa = spa_add(pname, config, NULL);
+
+ /*
+ * Set spa_ubsync.ub_version as it can be used in vdev_alloc()
+ * via spa_version().
+ */
+ if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION,
+ &spa->spa_ubsync.ub_version) != 0)
+ spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL;
} else if ((spa = spa_lookup(name)) == NULL) {
cmn_err(CE_NOTE, "Cannot find the pool label for '%s'",
name);
More information about the svn-src-head
mailing list