diff options
author | George Wilson <[email protected]> | 2012-12-14 16:28:49 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-01-08 10:35:43 -0800 |
commit | ea0b2538cd5967fcdf26b7b7c01859a060fef3e3 (patch) | |
tree | d4f65d52079c582793660d9f9fb28b6621b4ea25 /module | |
parent | 29809a6cbae9869ca6ee026337981b2c9771650a (diff) |
Illumos #3349: zpool upgrade -V bumps the on disk version number
3349 zpool upgrade -V bumps the on disk version number, but leaves
the in core version
Reviewed by: Adam Leventhal <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: Richard Lowe <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
illumos/illumos-gate@25345e466695fbe736faa53b8f3413d8e8f81981
https://www.illumos.org/issues/3349
Ported-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/spa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 0a785f78a..5b6465f2e 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) |