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:
parent
497ffa52ef
commit
833aeb586b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user