Skip to content

[v26.03.1] metadata: Prevent read hoisting in hash bucket lock#949

Merged
robertbaldyga merged 1 commit intoOpen-CAS:v26.03.1from
robertbaldyga:v26.03.1-hb-lock-entry-read-atomic
Apr 1, 2026
Merged

[v26.03.1] metadata: Prevent read hoisting in hash bucket lock#949
robertbaldyga merged 1 commit intoOpen-CAS:v26.03.1from
robertbaldyga:v26.03.1-hb-lock-entry-read-atomic

Conversation

@robertbaldyga
Copy link
Copy Markdown
Member

Replace plain read with atomic read to prevent compiler from read hoisting the entry value. So far the loop indirectly relied on OCF_COND_RESCHED_DEFAULT() acting as a opaque barrier, which does not need to be the case, especially in environments where OCF_COND_RESCHED_DEFAULT() is implemented as no-op.

Replace plain read with atomic read to prevent compiler from
read hoisting the entry value. So far the loop indirectly relied
on OCF_COND_RESCHED_DEFAULT() acting as a opaque barrier, which
does not need to be the case, especially in environments where
OCF_COND_RESCHED_DEFAULT() is implemented as no-op.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
@robertbaldyga robertbaldyga merged commit d54f2fc into Open-CAS:v26.03.1 Apr 1, 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