Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 2009 20:56:16 +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: r197843 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200910072056.n97KuGfc099150@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Wed Oct  7 20:56:15 2009
New Revision: 197843
URL: http://svn.freebsd.org/changeset/base/197843

Log:
  On FreeBSD it is enough to report provider removal when orphan event is
  received, we don't have to do it on every ENXIO error in I/O path.
  Solaris has no GEOM so they have to handle it in a less clean way.
  
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Wed Oct  7 20:54:07 2009	(r197842)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Wed Oct  7 20:56:15 2009	(r197843)
@@ -662,26 +662,6 @@ sendreq:
 static void
 vdev_geom_io_done(zio_t *zio)
 {
-
-	/*
-	 * If the device returned ENXIO, then attempt we should verify if GEOM
-	 * provider has been removed. If this is the case, then we trigger an
-	 * asynchronous removal of the device.
-	 */
-	if (zio->io_error == ENXIO) {
-		vdev_t *vd = zio->io_vd;
-		vdev_geom_ctx_t *ctx;
-		struct g_provider *pp = NULL;
-
-		ctx = vd->vdev_tsd;
-		if (ctx != NULL && ctx->gc_consumer != NULL)
-			pp = ctx->gc_consumer->provider;
-
-		if (pp == NULL || (pp->flags & G_PF_ORPHAN)) {
-			vd->vdev_remove_wanted = B_TRUE;
-			spa_async_request(zio->io_spa, SPA_ASYNC_REMOVE);
-		}
-	}
 }
 
 vdev_ops_t vdev_geom_ops = {



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