- Fix the issue with read access count modification on RAID-5 plexes properly.
If the access counts were not increased and decreased in equal numbers by gvinum consumers, the read access count would be inconsistent with the write access count. Instead, modify the read access count with the write access count directly to prevent any inconsistencies. Approved by: re (kib)
This commit is contained in:
parent
92c450dfd9
commit
08a0ba34aa
@ -133,10 +133,12 @@ gv_access(struct g_provider *pp, int dr, int dw, int de)
|
||||
error = ENXIO;
|
||||
gp = pp->geom;
|
||||
sc = gp->softc;
|
||||
if (dw > 0 && dr == 0)
|
||||
dr = 1;
|
||||
else if (dw < 0 && dr == 0)
|
||||
dr = -1;
|
||||
/*
|
||||
* We want to modify the read count with the write count in case we have
|
||||
* plexes in a RAID-5 organization.
|
||||
*/
|
||||
dr += dw;
|
||||
|
||||
LIST_FOREACH(d, &sc->drives, drive) {
|
||||
if (d->consumer == NULL)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user