Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2011 23:37:30 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r226551 - head/sys/boot/zfs
Message-ID:  <201110192337.p9JNbU3u047432@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Wed Oct 19 23:37:30 2011
New Revision: 226551
URL: http://svn.freebsd.org/changeset/base/226551

Log:
  Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs.
  
  MFC after:	3 days

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

Modified: head/sys/boot/zfs/zfsimpl.c
==============================================================================
--- head/sys/boot/zfs/zfsimpl.c	Wed Oct 19 23:33:48 2011	(r226550)
+++ head/sys/boot/zfs/zfsimpl.c	Wed Oct 19 23:37:30 2011	(r226551)
@@ -543,8 +543,6 @@ vdev_init_from_nvlist(const unsigned cha
 			vdev->v_state = VDEV_STATE_DEGRADED;
 		else if (isnt_present)
 			vdev->v_state = VDEV_STATE_CANT_OPEN;
-		else
-			vdev->v_state = VDEV_STATE_HEALTHY;
 	}
 
 	rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN,
@@ -912,6 +910,7 @@ vdev_probe(vdev_phys_read_t *read, void 
 	if (vdev) {
 		vdev->v_phys_read = read;
 		vdev->v_read_priv = read_priv;
+		vdev->v_state = VDEV_STATE_HEALTHY;
 	} else {
 		printf("ZFS: inconsistent nvlist contents\n");
 		return (EIO);



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