diff options
author | le <le@FreeBSD.org> | 2004-06-14 17:06:55 +0000 |
---|---|---|
committer | le <le@FreeBSD.org> | 2004-06-14 17:06:55 +0000 |
commit | 57fad3e864971a3e0cc58d39b912ffaa17b102c5 (patch) | |
tree | ac0e3b370e5b34809b74e8d9064c79b5d8db988a /sys/geom/vinum/geom_vinum_raid5.c | |
parent | 2bf674c5908073ac6959a2fda8387da1c1c95483 (diff) | |
download | FreeBSD-src-57fad3e864971a3e0cc58d39b912ffaa17b102c5.zip FreeBSD-src-57fad3e864971a3e0cc58d39b912ffaa17b102c5.tar.gz |
Correctly calculate subdisk offset in RAID5 plexes.
Diffstat (limited to 'sys/geom/vinum/geom_vinum_raid5.c')
-rw-r--r-- | sys/geom/vinum/geom_vinum_raid5.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/geom/vinum/geom_vinum_raid5.c b/sys/geom/vinum/geom_vinum_raid5.c index 0c604fe..62b6ea9 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; |