Author: mav
Date: Sat Sep 14 08:35:20 2013
New Revision: 255539
URL: http://svnweb.freebsd.org/changeset/base/255539

Log:
  MFC r253991:
  Make `zpool clear` to reopen also reconnected cache and spare devices.
  Since `zpool status` reports about such kinds of errors, it is strange
  that they are not cleared by `zpool clear`.

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c      Sat Sep 
14 08:33:58 2013        (r255538)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c      Sat Sep 
14 08:35:20 2013        (r255539)
@@ -2379,6 +2379,14 @@ vdev_clear(spa_t *spa, vdev_t *vd)
        for (int c = 0; c < vd->vdev_children; c++)
                vdev_clear(spa, vd->vdev_child[c]);
 
+       if (vd == rvd) {
+               for (int c = 0; c < spa->spa_l2cache.sav_count; c++)
+                       vdev_clear(spa, spa->spa_l2cache.sav_vdevs[c]);
+
+               for (int c = 0; c < spa->spa_spares.sav_count; c++)
+                       vdev_clear(spa, spa->spa_spares.sav_vdevs[c]);
+       }
+
        /*
         * If we're in the FAULTED state or have experienced failed I/O, then
         * clear the persistent state and attempt to reopen the device.  We
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"

Reply via email to