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 = {
_______________________________________________
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