diff options
author | Victor Latushkin <Victor.Latushkin@Sun.COM> | 2009-06-30 04:09:23 -0700 |
---|---|---|
committer | Victor Latushkin <Victor.Latushkin@Sun.COM> | 2009-06-30 04:09:23 -0700 |
commit | 4f0f5e5be9d3811b437d9156675d584e2a2f204a (patch) | |
tree | b0c00be7f2e8d83eb5e1283a185627492717d94d /usr/src/uts/common/fs/zfs/vdev.c | |
parent | dd1de3740722a4b99a74005255effebbd20a6d70 (diff) | |
download | illumos-gate-4f0f5e5be9d3811b437d9156675d584e2a2f204a.tar.gz |
6848242 zdb -e no longer works as expected
Diffstat (limited to 'usr/src/uts/common/fs/zfs/vdev.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c index a79cd6ce15..6408713a7e 100644 --- a/usr/src/uts/common/fs/zfs/vdev.c +++ b/usr/src/uts/common/fs/zfs/vdev.c @@ -1187,6 +1187,7 @@ vdev_validate(vdev_t *vd) nvlist_t *label; uint64_t guid, top_guid; uint64_t state; + boolean_t inactive_state; for (int c = 0; c < vd->vdev_children; c++) if (vdev_validate(vd->vdev_child[c]) != 0) @@ -1243,8 +1244,12 @@ vdev_validate(vdev_t *vd) nvlist_free(label); + inactive_state = (state == POOL_STATE_EXPORTED || + state == POOL_STATE_DESTROYED); + if (spa->spa_load_state == SPA_LOAD_OPEN && - state != POOL_STATE_ACTIVE) + !(state == POOL_STATE_ACTIVE) && + !(spa->spa_inactive_states_ok && inactive_state)) return (EBADF); /* |