svn commit: r325824 - stable/11/sys/geom/mountver
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Nov 14 18:17:24 UTC 2017
Author: trasz
Date: Tue Nov 14 18:17:23 2017
New Revision: 325824
URL: https://svnweb.freebsd.org/changeset/base/325824
Log:
MFC r325009:
Make gmountver(8) use direct dispatch.
MFC r325101:
Add back missing MTX_DEF, it still needs to be there.
(Although it's defined to be 0, so there's no functional change.)
Modified:
stable/11/sys/geom/mountver/g_mountver.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/geom/mountver/g_mountver.c
==============================================================================
--- stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 18:13:30 2017 (r325823)
+++ stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 18:17:23 2017 (r325824)
@@ -257,7 +257,7 @@ g_mountver_create(struct gctl_req *req, struct g_class
}
gp = g_new_geomf(mp, "%s", name);
sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
- mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF);
+ mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF | MTX_RECURSE);
TAILQ_INIT(&sc->sc_queue);
sc->sc_provider_name = strdup(pp->name, M_GEOM);
gp->softc = sc;
@@ -270,6 +270,7 @@ g_mountver_create(struct gctl_req *req, struct g_class
newpp = g_new_providerf(gp, "%s", gp->name);
newpp->mediasize = pp->mediasize;
newpp->sectorsize = pp->sectorsize;
+ newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE;
if ((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0) {
G_MOUNTVER_DEBUG(0, "Unmapped supported for %s.", gp->name);
@@ -280,6 +281,7 @@ g_mountver_create(struct gctl_req *req, struct g_class
}
cp = g_new_consumer(gp);
+ cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
error = g_attach(cp, pp);
if (error != 0) {
gctl_error(req, "Cannot attach to provider %s.", pp->name);
More information about the svn-src-stable-11
mailing list