Skip to content

Policy params tests and fixes - #985

Merged
robertbaldyga merged 4 commits into
Open-CAS:masterfrom
robertbaldyga:policy-params-fixes
Oct 15, 2026
Merged

robertbaldyga merged 4 commits into
Open-CAS:masterfrom
robertbaldyga:policy-params-fixes

Conversation

@robertbaldyga

Copy link
Copy Markdown
Member

No description provided.

The ranges are defined inclusively, so using regular range() causes
off-by-one bug. Introduce range_inclusive() to express inclusive
ranges explicitly and avoid this class of bugs.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
This fixes standby, which did not call setup for the policies at all,
and detach/attach path, which did not preserve policies parameters.
It also simplifies setup handling, as now all the policies are set
to default on cache creation, so on attach/standby_attach everything
is already initialized, and on the load path, the params are just
overwritten with metadata from the disk.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Check if cleaning/promotion/cleaning policy params are preserved after
cache is detached and attached.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
@robertbaldyga
robertbaldyga merged commit e873f68 into Open-CAS:master Oct 15, 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