Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 21:45:28 +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-8@freebsd.org
Subject:   svn commit: r199456 - stable/8/sys/geom
Message-ID:  <200911172145.nAHLjSVZ041513@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Nov 17 21:45:28 2009
New Revision: 199456
URL: http://svn.freebsd.org/changeset/base/199456

Log:
  MFC r196964:
  Do not check proper request alignment here in geom_dev in production.
  It will be checked any way later by g_io_check() in g_io_schedule_down().
  It is only needed here to not trigger panic from additional check, when
  INVARIANTS enabled. So cover it with #ifdef INVARIANTS. It saves two
  64bit divisions per request.

Modified:
  stable/8/sys/geom/geom_dev.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/geom/geom_dev.c
==============================================================================
--- stable/8/sys/geom/geom_dev.c	Tue Nov 17 21:43:42 2009	(r199455)
+++ stable/8/sys/geom/geom_dev.c	Tue Nov 17 21:45:28 2009	(r199456)
@@ -371,14 +371,14 @@ g_dev_strategy(struct bio *bp)
 	cp = dev->si_drv2;
 	KASSERT(cp->acr || cp->acw,
 	    ("Consumer with zero access count in g_dev_strategy"));
-
+#ifdef INVARIANTS
 	if ((bp->bio_offset % cp->provider->sectorsize) != 0 ||
 	    (bp->bio_bcount % cp->provider->sectorsize) != 0) {
 		bp->bio_resid = bp->bio_bcount;
 		biofinish(bp, NULL, EINVAL);
 		return;
 	}
-
+#endif
 	for (;;) {
 		/*
 		 * XXX: This is not an ideal solution, but I belive it to



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911172145.nAHLjSVZ041513>