summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2012-11-25 10:53:42 +0000
committermm <mm@FreeBSD.org>2012-11-25 10:53:42 +0000
commit82387c4bfabd5588635d15ed1401875365e698c1 (patch)
tree1b70d8eb3b847406f0093cd69db7a884485e433d /sys/cddl
parent048b91382659be160e79eb9adfed66923c00a572 (diff)
downloadFreeBSD-src-82387c4bfabd5588635d15ed1401875365e698c1.zip
FreeBSD-src-82387c4bfabd5588635d15ed1401875365e698c1.tar.gz
MFV r243012:
Illumos 13886:e3261d03efbf 3349 zpool upgrade -V bumps the on disk version number, but leaves the in core version References: https://www.illumos.org/issues/3349 MFC after: 1 week
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
index 370a6c3..c978f8a 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
@@ -5985,6 +5985,14 @@ spa_sync_config_object(spa_t *spa, dmu_tx_t *tx)
config = spa_config_generate(spa, spa->spa_root_vdev,
dmu_tx_get_txg(tx), B_FALSE);
+ /*
+ * If we're upgrading the spa version then make sure that
+ * the config object gets updated with the correct version.
+ */
+ if (spa->spa_ubsync.ub_version < spa->spa_uberblock.ub_version)
+ fnvlist_add_uint64(config, ZPOOL_CONFIG_VERSION,
+ spa->spa_uberblock.ub_version);
+
spa_config_exit(spa, SCL_STATE, FTAG);
if (spa->spa_config_syncing)
OpenPOWER on IntegriCloud