mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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.
This commit is contained in:
parent
9c4a609c2d
commit
c4511bef96
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue