Date: Sun, 19 Sep 2010 20:02:31 +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-7@freebsd.org Subject: svn commit: r212879 - stable/7/sys/geom Message-ID: <201009192002.o8JK2VcK014376@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009192002.o8JK2VcK014376>