Skip to content

Fix cached_clines accounting when moving invalid cache line - #988

Merged
robertbaldyga merged 1 commit into
Open-CAS:masterfrom
robertbaldyga:ioclass-stat-fix
Oct 16, 2026
Merged

robertbaldyga merged 1 commit into
Open-CAS:masterfrom
robertbaldyga:ioclass-stat-fix

Conversation

@robertbaldyga

Copy link
Copy Markdown
Member

Only valid cache lines are accounted in cached_clines, and a line gets accounted to its current partition once it becomes valid. However ocf_user_part_move() moved the counter for every cache line, so moving a line that is mapped, but not valid (e.g. left mapped by a failed read miss for a request of another IO class waiting for it), underflowed the counter of the source partition and accounted the line twice in the destination one.

Only valid cache lines are accounted in cached_clines, and a line gets
accounted to its current partition once it becomes valid. However
ocf_user_part_move() moved the counter for every cache line, so moving
a line that is mapped, but not valid (e.g. left mapped by a failed read
miss for a request of another IO class waiting for it), underflowed the
counter of the source partition and accounted the line twice in the
destination one.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
@robertbaldyga
robertbaldyga merged commit 65574ad into Open-CAS:master Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant