Date: Fri, 20 May 2016 08:25:38 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300288 - in head/sys/geom: . eli journal mirror mountver raid raid3 Message-ID: <201605200825.u4K8PcNo018710@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri May 20 08:25:37 2016 New Revision: 300288 URL: https://svnweb.freebsd.org/changeset/base/300288 Log: Removal of Giant droping wrappers for GEOM classes. Sponsored by: The FreeBSD Foundation Modified: head/sys/geom/eli/g_eli.c head/sys/geom/geom_mbr.c head/sys/geom/geom_pc98.c head/sys/geom/geom_subr.c head/sys/geom/journal/g_journal.c head/sys/geom/mirror/g_mirror.c head/sys/geom/mountver/g_mountver.c head/sys/geom/raid/g_raid.c head/sys/geom/raid3/g_raid3.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/eli/g_eli.c Fri May 20 08:25:37 2016 (r300288) @@ -1231,7 +1231,6 @@ g_eli_shutdown_pre_sync(void *arg, int h int error; mp = arg; - DROP_GIANT(); g_topology_lock(); LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { sc = gp->softc; @@ -1247,7 +1246,6 @@ g_eli_shutdown_pre_sync(void *arg, int h } } g_topology_unlock(); - PICKUP_GIANT(); } static void Modified: head/sys/geom/geom_mbr.c ============================================================================== --- head/sys/geom/geom_mbr.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/geom_mbr.c Fri May 20 08:25:37 2016 (r300288) @@ -190,7 +190,6 @@ g_mbr_ioctl(struct g_provider *pp, u_lon case DIOCSMBR: { if (!(fflag & FWRITE)) return (EPERM); - DROP_GIANT(); g_topology_lock(); cp = LIST_FIRST(&gp->consumer); if (cp->acw == 0) { @@ -205,7 +204,6 @@ g_mbr_ioctl(struct g_provider *pp, u_lon if (opened) g_access(cp, 0, -1 , 0); g_topology_unlock(); - PICKUP_GIANT(); return(error); } default: Modified: head/sys/geom/geom_pc98.c ============================================================================== --- head/sys/geom/geom_pc98.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/geom_pc98.c Fri May 20 08:25:37 2016 (r300288) @@ -176,7 +176,6 @@ g_pc98_ioctl(struct g_provider *pp, u_lo case DIOCSPC98: { if (!(fflag & FWRITE)) return (EPERM); - DROP_GIANT(); g_topology_lock(); cp = LIST_FIRST(&gp->consumer); if (cp->acw == 0) { @@ -191,7 +190,6 @@ g_pc98_ioctl(struct g_provider *pp, u_lo if (opened) g_access(cp, 0, -1 , 0); g_topology_unlock(); - PICKUP_GIANT(); return(error); } default: Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/geom_subr.c Fri May 20 08:25:37 2016 (r300288) @@ -247,9 +247,7 @@ g_modevent(module_t mod, int type, void break; case MOD_UNLOAD: g_trace(G_T_TOPOLOGY, "g_modevent(%s, UNLOAD)", mp->name); - DROP_GIANT(); error = g_unload_class(mp); - PICKUP_GIANT(); if (error == 0) { KASSERT(LIST_EMPTY(&mp->geom), ("Unloaded class (%s) still has geom", mp->name)); Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/journal/g_journal.c Fri May 20 08:25:37 2016 (r300288) @@ -2697,7 +2697,6 @@ g_journal_shutdown(void *arg, int howto if (panicstr != NULL) return; mp = arg; - DROP_GIANT(); g_topology_lock(); LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { if (gp->softc == NULL) @@ -2706,7 +2705,6 @@ g_journal_shutdown(void *arg, int howto g_journal_destroy(gp->softc); } g_topology_unlock(); - PICKUP_GIANT(); } /* @@ -2725,7 +2723,6 @@ g_journal_lowmem(void *arg, int howto __ g_journal_stats_low_mem++; mp = arg; - DROP_GIANT(); g_topology_lock(); LIST_FOREACH(gp, &mp->geom, geom) { sc = gp->softc; @@ -2756,7 +2753,6 @@ g_journal_lowmem(void *arg, int howto __ break; } g_topology_unlock(); - PICKUP_GIANT(); } static void g_journal_switcher(void *arg); @@ -2871,7 +2867,6 @@ g_journal_do_switch(struct g_class *clas char *mountpoint; int error, save; - DROP_GIANT(); g_topology_lock(); LIST_FOREACH(gp, &classp->geom, geom) { sc = gp->softc; @@ -2886,7 +2881,6 @@ g_journal_do_switch(struct g_class *clas mtx_unlock(&sc->sc_mtx); } g_topology_unlock(); - PICKUP_GIANT(); mtx_lock(&mountlist_mtx); TAILQ_FOREACH(mp, &mountlist, mnt_list) { @@ -2901,11 +2895,9 @@ g_journal_do_switch(struct g_class *clas continue; /* mtx_unlock(&mountlist_mtx) was done inside vfs_busy() */ - DROP_GIANT(); g_topology_lock(); sc = g_journal_find_device(classp, mp->mnt_gjprovider); g_topology_unlock(); - PICKUP_GIANT(); if (sc == NULL) { GJ_DEBUG(0, "Cannot find journal geom for %s.", @@ -2984,7 +2976,6 @@ next: sc = NULL; for (;;) { - DROP_GIANT(); g_topology_lock(); LIST_FOREACH(gp, &g_journal_class.geom, geom) { sc = gp->softc; @@ -3000,7 +2991,6 @@ next: sc = NULL; } g_topology_unlock(); - PICKUP_GIANT(); if (sc == NULL) break; mtx_assert(&sc->sc_mtx, MA_OWNED); Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/mirror/g_mirror.c Fri May 20 08:25:37 2016 (r300288) @@ -3310,7 +3310,6 @@ g_mirror_shutdown_post_sync(void *arg, i int error; mp = arg; - DROP_GIANT(); g_topology_lock(); g_mirror_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { @@ -3329,7 +3328,6 @@ g_mirror_shutdown_post_sync(void *arg, i g_topology_lock(); } g_topology_unlock(); - PICKUP_GIANT(); } static void Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/mountver/g_mountver.c Fri May 20 08:25:37 2016 (r300288) @@ -611,12 +611,10 @@ g_mountver_shutdown_pre_sync(void *arg, struct g_geom *gp, *gp2; mp = arg; - DROP_GIANT(); g_topology_lock(); LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) g_mountver_destroy(gp, 1); g_topology_unlock(); - PICKUP_GIANT(); } static void Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/raid/g_raid.c Fri May 20 08:25:37 2016 (r300288) @@ -2462,7 +2462,6 @@ g_raid_shutdown_post_sync(void *arg, int struct g_raid_volume *vol; mp = arg; - DROP_GIANT(); g_topology_lock(); g_raid_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { @@ -2477,7 +2476,6 @@ g_raid_shutdown_post_sync(void *arg, int g_topology_lock(); } g_topology_unlock(); - PICKUP_GIANT(); } static void Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Fri May 20 08:22:20 2016 (r300287) +++ head/sys/geom/raid3/g_raid3.c Fri May 20 08:25:37 2016 (r300288) @@ -3543,7 +3543,6 @@ g_raid3_shutdown_post_sync(void *arg, in int error; mp = arg; - DROP_GIANT(); g_topology_lock(); g_raid3_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { @@ -3562,7 +3561,6 @@ g_raid3_shutdown_post_sync(void *arg, in g_topology_lock(); } g_topology_unlock(); - PICKUP_GIANT(); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605200825.u4K8PcNo018710>