diff options
author | Brian Behlendorf <[email protected]> | 2014-10-10 18:12:47 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-10-17 14:59:05 -0700 |
commit | 33074f2254db76f7237e5a29877558ef920ae325 (patch) | |
tree | 57d7ec4287f3c724f8ba9b3fa434067dde7eb889 | |
parent | f0e324f25d5ada5da5f8930fc1789af6896c72b4 (diff) |
Handle NULL mirror child vdev
When selecting a mirror child it's possible that map allocated by
vdev_mirror_map_allc() contains a NULL for the child vdev. In
this case the child should be skipped and the read issues to
another member of the mirror.
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ned Bass <[email protected]>
Closes #1744
-rw-r--r-- | module/zfs/vdev_mirror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/vdev_mirror.c b/module/zfs/vdev_mirror.c index 99b35f085..17417a0fa 100644 --- a/module/zfs/vdev_mirror.c +++ b/module/zfs/vdev_mirror.c @@ -300,7 +300,7 @@ vdev_mirror_child_select(zio_t *zio) mc = &mm->mm_child[c]; if (mc->mc_tried || mc->mc_skipped) continue; - if (!vdev_readable(mc->mc_vd)) { + if (mc->mc_vd == NULL || !vdev_readable(mc->mc_vd)) { mc->mc_error = SET_ERROR(ENXIO); mc->mc_tried = 1; /* don't even try */ mc->mc_skipped = 1; |