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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to