Date: Mon, 9 Aug 2010 06:36:11 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r211091 - head/sys/boot/zfs Message-ID: <201008090636.o796aBw8004391@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008090636.o796aBw8004391>