summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorTim Haley <Tim.Haley@Sun.COM>2010-02-24 16:01:27 -0700
committerTim Haley <Tim.Haley@Sun.COM>2010-02-24 16:01:27 -0700
commit4b44c88c2405f39ecccf8eda4069574f3f137ab9 (patch)
tree9064a78e0e535a5458f607ff61431e0bf58b2e6c /usr
parent2215e990accbb747e6562e1cf14b772c9341dd35 (diff)
downloadillumos-gate-4b44c88c2405f39ecccf8eda4069574f3f137ab9.tar.gz
6929453 panic in zfs-test hotspare_replace_003_pos
Diffstat (limited to 'usr')
-rw-r--r--usr/src/uts/common/fs/zfs/spa.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/zfs/spa.c b/usr/src/uts/common/fs/zfs/spa.c
index 26d46dee1d..630cef0a2c 100644
--- a/usr/src/uts/common/fs/zfs/spa.c
+++ b/usr/src/uts/common/fs/zfs/spa.c
@@ -2190,8 +2190,6 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
nvlist_t **config)
{
spa_t *spa;
- zpool_rewind_policy_t policy;
- spa_load_state_t state = SPA_LOAD_OPEN;
int error;
int locked = B_FALSE;
@@ -2214,11 +2212,14 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
return (ENOENT);
}
- zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config, &policy);
- if (policy.zrp_request & ZPOOL_DO_REWIND)
- state = SPA_LOAD_RECOVER;
-
if (spa->spa_state == POOL_STATE_UNINITIALIZED) {
+ spa_load_state_t state = SPA_LOAD_OPEN;
+ zpool_rewind_policy_t policy;
+
+ zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config,
+ &policy);
+ if (policy.zrp_request & ZPOOL_DO_REWIND)
+ state = SPA_LOAD_RECOVER;
spa_activate(spa, spa_mode_global);