Date: Tue, 18 Jun 2013 09:39:53 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r251925 - stable/9/sys/geom Message-ID: <201306180939.r5I9drRN088398@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Jun 18 09:39:52 2013 New Revision: 251925 URL: http://svnweb.freebsd.org/changeset/base/251925 Log: MFC r248722: geom_slice.c and its consumers like GEOM_LABEL are not touching the data unless hotspots are used. Pass G_PF_ACCEPT_UNMAPPED flag through except such rare cases (obsolete GEOM_SUNLABEL and GEOM_BSD). Modified: stable/9/sys/geom/geom_slice.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_slice.c ============================================================================== --- stable/9/sys/geom/geom_slice.c Tue Jun 18 09:37:44 2013 (r251924) +++ stable/9/sys/geom/geom_slice.c Tue Jun 18 09:39:52 2013 (r251925) @@ -397,6 +397,8 @@ 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) + pp->flags |= pp2->flags & G_PF_ACCEPT_UNMAPPED; if (0 && bootverbose) printf("GEOM: Configure %s, start %jd length %jd end %jd\n", pp->name, (intmax_t)offset, (intmax_t)length, @@ -429,11 +431,17 @@ g_slice_conf_hot(struct g_geom *gp, u_in { struct g_slicer *gsp; struct g_slice_hot *gsl, *gsl2; + 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. */ + if (gsp->nhotspot == 0) { + LIST_FOREACH(pp, &gp->provider, provider) + pp->flags &= ~G_PF_ACCEPT_UNMAPPED; + } gsl = gsp->hotspot; if(idx >= gsp->nhotspot) { gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_WAITOK | M_ZERO);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306180939.r5I9drRN088398>