diff options
author | mav <mav@FreeBSD.org> | 2009-09-08 05:46:38 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-09-08 05:46:38 +0000 |
commit | 676cac231c069842bf50a04b5c1ebb4bbdf57d53 (patch) | |
tree | dc816798c2845b7a153c9df99e2df9e8b2678726 /sys/geom/geom_dev.c | |
parent | 081d756b8d796892f6067516bcae5d96fff34b57 (diff) | |
download | FreeBSD-src-676cac231c069842bf50a04b5c1ebb4bbdf57d53.zip FreeBSD-src-676cac231c069842bf50a04b5c1ebb4bbdf57d53.tar.gz |
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.
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r-- | sys/geom/geom_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index b40dea0..8b560ab 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -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 |