1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Correctly calculate subdisk offset in RAID5 plexes.

This commit is contained in:
Lukas Ertl 2004-06-14 17:06:55 +00:00
parent f47320845a
commit 1a9e260fd4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130477

View File

@ -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;