From owner-svn-src-head@FreeBSD.ORG Tue Mar 26 07:55:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 95E1BBBC; Tue, 26 Mar 2013 07:55:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 88414615; Tue, 26 Mar 2013 07:55:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2Q7tPYQ065830; Tue, 26 Mar 2013 07:55:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2Q7tPv6065829; Tue, 26 Mar 2013 07:55:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201303260755.r2Q7tPv6065829@svn.freebsd.org> From: Alexander Motin Date: Tue, 26 Mar 2013 07:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248722 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2013 07:55:25 -0000 Author: mav Date: Tue Mar 26 07:55:24 2013 New Revision: 248722 URL: http://svnweb.freebsd.org/changeset/base/248722 Log: 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: head/sys/geom/geom_slice.c Modified: head/sys/geom/geom_slice.c ============================================================================== --- head/sys/geom/geom_slice.c Tue Mar 26 05:58:49 2013 (r248721) +++ head/sys/geom/geom_slice.c Tue Mar 26 07:55:24 2013 (r248722) @@ -396,6 +396,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, @@ -428,11 +430,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);