From: Brian Behlendorf Date: Sat, 11 Oct 2014 01:12:47 +0000 (-0700) Subject: Handle NULL mirror child vdev X-Git-Tag: zfs-0.6.4~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33074f2254db76f7237e5a29877558ef920ae325;p=zfs 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 Signed-off-by: Ned Bass Closes #1744 --- 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;