From owner-freebsd-fs@FreeBSD.ORG Thu Aug 5 16:30:11 2010 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3974106567C for ; Thu, 5 Aug 2010 16:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 777358FC13 for ; Thu, 5 Aug 2010 16:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o75GUBh9092788 for ; Thu, 5 Aug 2010 16:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o75GUBig092787; Thu, 5 Aug 2010 16:30:11 GMT (envelope-from gnats) Date: Thu, 5 Aug 2010 16:30:11 GMT Message-Id: <201008051630.o75GUBig092787@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Martin Matuska Cc: Subject: Re: kern/148655: [zfs] Booting from a degraded raidz no longer works in 8-STABLE [regression] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Martin Matuska List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2010 16:30:11 -0000 The following reply was made to PR kern/148655; it has been noted by GNATS. From: Martin Matuska To: bug-followup@FreeBSD.org, am@raisa.eu.org Cc: Andriy Gapon , Pawel Jakub Dawidek , Xin LI 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--