svn commit: r253991 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Tue Aug 6 14:23:34 UTC 2013
Author: mav
Date: Tue Aug 6 14:23:33 2013
New Revision: 253991
URL: http://svnweb.freebsd.org/changeset/base/253991
Log:
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:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Aug 6 14:20:41 2013 (r253990)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Aug 6 14:23:33 2013 (r253991)
@@ -2383,6 +2383,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
More information about the svn-src-all
mailing list