diff options
-rw-r--r-- | sys/geom/geom_dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 261e1f297b6d..5bb9d4244114 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -347,6 +347,12 @@ g_dev_strategy(struct bio *bp) KASSERT(cp->acr || cp->acw, ("Consumer with zero access count in g_dev_strategy")); + if ((bp->bio_offset % cp->provider->sectorsize) != 0 || + (bp->bio_bcount % cp->provider->sectorsize) != 0) { + biofinish(bp, NULL, EINVAL); + return; + } + for (;;) { /* * XXX: This is not an ideal solution, but I belive it to |