From owner-svn-src-all@freebsd.org Thu Oct 6 15:36:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EDAEBD3279; Thu, 6 Oct 2016 15:36:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6E662B; Thu, 6 Oct 2016 15:36:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96FaFLr044408; Thu, 6 Oct 2016 15:36:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96FaEHr044395; Thu, 6 Oct 2016 15:36:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610061536.u96FaEHr044395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Oct 2016 15:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306765 - in stable/10/sys/geom: bde concat gate journal linux_lvm mirror mountver raid3 shsec stripe vinum virstor X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 15:36:16 -0000 Author: mav Date: Thu Oct 6 15:36:13 2016 New Revision: 306765 URL: https://svnweb.freebsd.org/changeset/base/306765 Log: MFC r306279: Use g_wither_provider() where applicable. It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Modified: stable/10/sys/geom/bde/g_bde.c stable/10/sys/geom/concat/g_concat.c stable/10/sys/geom/gate/g_gate.c stable/10/sys/geom/journal/g_journal.c stable/10/sys/geom/linux_lvm/g_linux_lvm.c stable/10/sys/geom/mirror/g_mirror.c stable/10/sys/geom/mountver/g_mountver.c stable/10/sys/geom/raid3/g_raid3.c stable/10/sys/geom/shsec/g_shsec.c stable/10/sys/geom/stripe/g_stripe.c stable/10/sys/geom/vinum/geom_vinum_rm.c stable/10/sys/geom/virstor/g_virstor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/bde/g_bde.c ============================================================================== --- stable/10/sys/geom/bde/g_bde.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/bde/g_bde.c Thu Oct 6 15:36:13 2016 (r306765) @@ -85,7 +85,7 @@ g_bde_orphan(struct g_consumer *cp) sc = gp->softc; gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: stable/10/sys/geom/concat/g_concat.c ============================================================================== --- stable/10/sys/geom/concat/g_concat.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/concat/g_concat.c Thu Oct 6 15:36:13 2016 (r306765) @@ -130,10 +130,9 @@ g_concat_remove_disk(struct g_concat_dis } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_CONCAT_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/10/sys/geom/gate/g_gate.c ============================================================================== --- stable/10/sys/geom/gate/g_gate.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/gate/g_gate.c Thu Oct 6 15:36:13 2016 (r306765) @@ -111,8 +111,7 @@ g_gate_destroy(struct g_gate_softc *sc, wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); gp = pp->geom; - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); callout_drain(&sc->sc_callout); bioq_init(&queue); mtx_lock(&sc->sc_queue_mtx); Modified: stable/10/sys/geom/journal/g_journal.c ============================================================================== --- stable/10/sys/geom/journal/g_journal.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/journal/g_journal.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2465,8 +2465,7 @@ g_journal_destroy(struct g_journal_softc GJ_DEBUG(1, "Marking %s as clean.", sc->sc_name); g_journal_metadata_update(sc); g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); } else { g_topology_lock(); } Modified: stable/10/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- stable/10/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:36:13 2016 (r306765) @@ -334,7 +334,7 @@ g_llvm_remove_disk(struct g_llvm_vg *vg, if (found) { G_LLVM_DEBUG(0, "Device %s removed.", lv->lv_gprov->name); - g_orphan_provider(lv->lv_gprov, ENXIO); + g_wither_provider(lv->lv_gprov, ENXIO); lv->lv_gprov = NULL; } } Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/mirror/g_mirror.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2145,10 +2145,9 @@ g_mirror_destroy_provider(struct g_mirro mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); - g_topology_unlock(); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; + g_topology_unlock(); LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) g_mirror_sync_stop(disk, 1); Modified: stable/10/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/10/sys/geom/mountver/g_mountver.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/mountver/g_mountver.c Thu Oct 6 15:36:13 2016 (r306765) @@ -327,7 +327,7 @@ g_mountver_destroy(struct g_geom *gp, bo G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); } if (pp != NULL) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_mountver_discard_queued(gp); g_free(sc->sc_provider_name); g_free(gp->softc); Modified: stable/10/sys/geom/raid3/g_raid3.c ============================================================================== --- stable/10/sys/geom/raid3/g_raid3.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/raid3/g_raid3.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2378,8 +2378,7 @@ g_raid3_destroy_provider(struct g_raid3_ mtx_unlock(&sc->sc_queue_mtx); G_RAID3_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); g_topology_unlock(); sc->sc_provider = NULL; if (sc->sc_syncdisk != NULL) Modified: stable/10/sys/geom/shsec/g_shsec.c ============================================================================== --- stable/10/sys/geom/shsec/g_shsec.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/shsec/g_shsec.c Thu Oct 6 15:36:13 2016 (r306765) @@ -158,7 +158,7 @@ g_shsec_remove_disk(struct g_consumer *c sc->sc_disks[no] = NULL; if (sc->sc_provider != NULL) { - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; G_SHSEC_DEBUG(0, "Device %s removed.", sc->sc_name); } Modified: stable/10/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/10/sys/geom/stripe/g_stripe.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/stripe/g_stripe.c Thu Oct 6 15:36:13 2016 (r306765) @@ -174,10 +174,9 @@ g_stripe_remove_disk(struct g_consumer * } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_STRIPE_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/10/sys/geom/vinum/geom_vinum_rm.c ============================================================================== --- stable/10/sys/geom/vinum/geom_vinum_rm.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/vinum/geom_vinum_rm.c Thu Oct 6 15:36:13 2016 (r306765) @@ -223,8 +223,7 @@ gv_rm_vol(struct gv_softc *sc, struct gv /* Get rid of the volume's provider. */ if (pp != NULL) { g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_topology_unlock(); } } Modified: stable/10/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/10/sys/geom/virstor/g_virstor.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/virstor/g_virstor.c Thu Oct 6 15:36:13 2016 (r306765) @@ -904,11 +904,9 @@ remove_component(struct g_virstor_softc LOG_MSG(LVL_DEBUG, "Component %s removed from %s", c->provider->name, sc->geom->name); if (sc->provider != NULL) { - /* Whither, GEOM? */ - sc->provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->provider, ENXIO); + LOG_MSG(LVL_INFO, "Removing provider %s", sc->provider->name); + g_wither_provider(sc->provider, ENXIO); sc->provider = NULL; - LOG_MSG(LVL_INFO, "Removing provider %s", sc->geom->name); } if (c->acr > 0 || c->acw > 0 || c->ace > 0)