aboutsummaryrefslogtreecommitdiff
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorGeorge Wilson <george.wilson@delphix.com>2012-12-15 00:28:49 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2013-01-08 18:35:43 +0000
commitea0b2538cd5967fcdf26b7b7c01859a060fef3e3 (patch)
treed4f65d52079c582793660d9f9fb28b6621b4ea25 /module/zfs/spa.c
parent29809a6cbae9869ca6ee026337981b2c9771650a (diff)
downloadsrc-ea0b2538cd5967fcdf26b7b7c01859a060fef3e3.tar.gz
src-ea0b2538cd5967fcdf26b7b7c01859a060fef3e3.zip
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r--module/zfs/spa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 0a785f78a6cb..5b6465f2ebb0 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -5742,6 +5742,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)