Mercurial > illumos > illumos-gate
changeset 1733:a7c3bc84e012
6407377 spa_tryimport() is broken
author | bonwick |
---|---|
date | Sun, 02 Apr 2006 04:36:35 -0700 |
parents | 9e3ae798af31 |
children | 952a1f480f46 |
files | usr/src/uts/common/fs/zfs/spa.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/spa.c Sun Apr 02 00:47:06 2006 -0800 +++ b/usr/src/uts/common/fs/zfs/spa.c Sun Apr 02 04:36:35 2006 -0700 @@ -275,13 +275,14 @@ spa->spa_load_state = state; if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot) || - nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &pool_guid) || - (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, - &spa->spa_config_txg) && mosconfig)) { + nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &pool_guid)) { error = EINVAL; goto out; } + (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, + &spa->spa_config_txg); + if ((state == SPA_LOAD_IMPORT || state == SPA_LOAD_TRYIMPORT) && spa_guid_exists(pool_guid, 0)) { error = EEXIST;