From 1a9e260fd487c3e79e36bbd937c2d6db5137ccb5 Mon Sep 17 00:00:00 2001 From: Lukas Ertl Date: Mon, 14 Jun 2004 17:06:55 +0000 Subject: [PATCH] Correctly calculate subdisk offset in RAID5 plexes. --- sys/geom/vinum/geom_vinum_raid5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/geom/vinum/geom_vinum_raid5.c b/sys/geom/vinum/geom_vinum_raid5.c index 0c604fec53a..62b6ea9b54a 100644 --- a/sys/geom/vinum/geom_vinum_raid5.c +++ b/sys/geom/vinum/geom_vinum_raid5.c @@ -297,8 +297,7 @@ gv_build_raid5_req(struct gv_raid5_packet *wp, struct bio *bp, caddr_t addr, stripestart = (boff - stripeoff) / (p->sdcount - 1); KASSERT(stripestart >= 0, ("gv_build_raid5_request: stripestart < 0")); - if (stripeoff >= p->stripesize) - stripeoff -= p->stripesize; + stripeoff %= p->stripesize; /* The offset of the request on this subdisk. */ real_off = stripestart + stripeoff;