kern/148655: [zfs] Booting from a degraded raidz no longer works
in 8-STABLE [regression]
Martin Matuska
mm at FreeBSD.org
Thu Aug 5 16:30:11 UTC 2010
The following reply was made to PR kern/148655; it has been noted by GNATS.
From: Martin Matuska <mm at FreeBSD.org>
To: bug-followup at FreeBSD.org, am at raisa.eu.org
Cc: Andriy Gapon <avg at icyb.net.ua>, Pawel Jakub Dawidek <pjd at freebsd.org>,
Xin LI <delphij at freebsd.org>
Subject: Re: kern/148655: [zfs] Booting from a degraded raidz no longer works
in 8-STABLE [regression]
Date: Thu, 05 Aug 2010 18:23:43 +0200
This is a multi-part message in MIME format.
--------------050900020709060502070203
Content-Type: text/plain; charset=windows-1250
Content-Transfer-Encoding: 7bit
A proposed patch is attached.
The function vdev_read_phys() (sys/boot/zfs/zfsimpl.c, #325) does call
vdev->v_phys_read() without checking if that function is registered.
This check should be done in vdev_read_phys before doing anything else.
vdev_create initializes vdev->v_phys_read as 0 and unavailable vdevs
keep this value.
--------------050900020709060502070203
Content-Type: text/plain;
name="head-zfsimpl.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="head-zfsimpl.c.patch"
Index: sys/boot/zfs/zfsimpl.c
===================================================================
--- sys/boot/zfs/zfsimpl.c (revision 210854)
+++ sys/boot/zfs/zfsimpl.c (working copy)
@@ -328,6 +328,9 @@
size_t psize;
int rc;
+ if (!vdev->v_phys_read)
+ return (EIO);
+
if (bp) {
psize = BP_GET_PSIZE(bp);
} else {
--------------050900020709060502070203--
More information about the freebsd-fs
mailing list