Date: Sat, 24 Nov 2012 13:16:49 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243501 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201211241316.qAODGnHb058485@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@gmail.com> Tested by: Andrei Lavreniyuk <andy.lavr@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211241316.qAODGnHb058485>