svn commit: r212879 - stable/7/sys/geom

Alexander Motin mav at FreeBSD.org
Sun Sep 19 20:02:31 UTC 2010


Author: mav
Date: Sun Sep 19 20:02:31 2010
New Revision: 212879
URL: http://svn.freebsd.org/changeset/base/212879

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/7/sys/geom/geom_dev.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/geom/geom_dev.c
==============================================================================
--- stable/7/sys/geom/geom_dev.c	Sun Sep 19 19:57:15 2010	(r212878)
+++ stable/7/sys/geom/geom_dev.c	Sun Sep 19 20:02:31 2010	(r212879)
@@ -373,14 +373,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


More information about the svn-src-all mailing list