svn commit: r211091 - head/sys/boot/zfs

Martin Matuska mm at FreeBSD.org
Mon Aug 9 06:36:11 UTC 2010


Author: mm
Date: Mon Aug  9 06:36:11 2010
New Revision: 211091
URL: http://svn.freebsd.org/changeset/base/211091

Log:
  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

Modified:
  head/sys/boot/zfs/zfsimpl.c

Modified: head/sys/boot/zfs/zfsimpl.c
==============================================================================
--- head/sys/boot/zfs/zfsimpl.c	Mon Aug  9 06:02:23 2010	(r211090)
+++ head/sys/boot/zfs/zfsimpl.c	Mon Aug  9 06:36:11 2010	(r211091)
@@ -328,6 +328,9 @@ vdev_read_phys(vdev_t *vdev, const blkpt
 	size_t psize;
 	int rc;
 
+	if (!vdev->v_phys_read)
+		return (EIO);
+
 	if (bp) {
 		psize = BP_GET_PSIZE(bp);
 	} else {


More information about the svn-src-all mailing list