svn commit: r254903 - projects/camlock/sys/geom
Alexander Motin
mav at FreeBSD.org
Mon Aug 26 10:32:37 UTC 2013
Author: mav
Date: Mon Aug 26 10:32:36 2013
New Revision: 254903
URL: http://svnweb.freebsd.org/changeset/base/254903
Log:
Declare GEOM direct dispatch support for geom_slice.c unless hotspots are
used. In general case hotspots may cause any of direct dispatch problems.
Fortunately they are used very rarely.
Modified:
projects/camlock/sys/geom/geom_slice.c
Modified: projects/camlock/sys/geom/geom_slice.c
==============================================================================
--- projects/camlock/sys/geom/geom_slice.c Mon Aug 26 10:27:15 2013 (r254902)
+++ projects/camlock/sys/geom/geom_slice.c Mon Aug 26 10:32:36 2013 (r254903)
@@ -396,8 +396,10 @@ g_slice_config(struct g_geom *gp, u_int
pp->stripeoffset = pp2->stripeoffset + offset;
if (pp->stripesize > 0)
pp->stripeoffset %= pp->stripesize;
- if (gsp->nhotspot == 0)
+ if (gsp->nhotspot == 0) {
pp->flags |= pp2->flags & G_PF_ACCEPT_UNMAPPED;
+ pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE;
+ }
if (0 && bootverbose)
printf("GEOM: Configure %s, start %jd length %jd end %jd\n",
pp->name, (intmax_t)offset, (intmax_t)length,
@@ -430,16 +432,20 @@ g_slice_conf_hot(struct g_geom *gp, u_in
{
struct g_slicer *gsp;
struct g_slice_hot *gsl, *gsl2;
+ struct g_consumer *cp;
struct g_provider *pp;
g_trace(G_T_TOPOLOGY, "g_slice_conf_hot(%s, idx: %d, off: %jd, len: %jd)",
gp->name, idx, (intmax_t)offset, (intmax_t)length);
g_topology_assert();
gsp = gp->softc;
- /* Deny unmapped I/O if hotspots are used. */
+ /* Deny unmapped I/O and direct dispatch if hotspots are used. */
if (gsp->nhotspot == 0) {
LIST_FOREACH(pp, &gp->provider, provider)
- pp->flags &= ~G_PF_ACCEPT_UNMAPPED;
+ pp->flags &= ~(G_PF_ACCEPT_UNMAPPED |
+ G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE);
+ LIST_FOREACH(cp, &gp->consumer, consumer)
+ cp->flags &= ~(G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE);
}
gsl = gsp->hotspot;
if(idx >= gsp->nhotspot) {
@@ -511,6 +517,7 @@ g_slice_new(struct g_class *mp, u_int sl
if (gp->class->destroy_geom == NULL)
gp->class->destroy_geom = g_slice_destroy_geom;
cp = g_new_consumer(gp);
+ cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
error = g_attach(cp, pp);
if (error == 0)
error = g_access(cp, 1, 0, 0);
More information about the svn-src-projects
mailing list