X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fspa.c;fp=module%2Fzfs%2Fspa.c;h=5b6465f2ebb0a042c07008697e0e385f0b59f3f1;hb=ea0b2538cd5967fcdf26b7b7c01859a060fef3e3;hp=0a785f78a6cb51e7665d9fd80a59b7578699685c;hpb=29809a6cbae9869ca6ee026337981b2c9771650a;p=zfs.git diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 0a785f7..5b6465f 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)