Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2013 14:23:34 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253991 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201308061423.r76ENYRQ027607@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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