Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 2010 16:30:11 GMT
From:      Martin Matuska <mm@FreeBSD.org>
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/148655: [zfs] Booting from a degraded raidz no longer works in 8-STABLE [regression]
Message-ID:  <201008051630.o75GUBig092787@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR kern/148655; it has been noted by GNATS.

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org, am@raisa.eu.org
Cc: Andriy Gapon <avg@icyb.net.ua>, Pawel Jakub Dawidek <pjd@freebsd.org>, 
 Xin LI <delphij@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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008051630.o75GUBig092787>