Return EIO if vdev->v_phys_read is NULL.

This fixes booting from a ZFS mirror with a unavailable primary device.

PR:		kern/148655
Reviewed by:	avg
Approved by:	delphij (mentor)
MFC after:	3 days
This commit is contained in:
Martin Matuska 2010-08-09 06:36:11 +00:00
parent 497ffa52ef
commit 833aeb586b

View File

@ -328,6 +328,9 @@ vdev_read_phys(vdev_t *vdev, const blkptr_t *bp, void *buf,
size_t psize;
int rc;
if (!vdev->v_phys_read)
return (EIO);
if (bp) {
psize = BP_GET_PSIZE(bp);
} else {