diff options
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); /* |