Repository navigation
Decouple metadata concurrency layer from metadata layer - #982
Merged
robertbaldyga merged 8 commits intoOct 8, 2026
Merged
Conversation
Move the fields to the metadata structure and add accessors. This allows to drop reverse dependency on ocf_cache_priv.h in metadata.h. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Collision segment pages flushed at runtime are already protected by collision page locks, which keep each cache line consistent. All other segments are flushed only from management operations, and nothing changes their content concurrently. The shared global lock adds no protection, and it delays I/O-path metadata flushes behind exclusive management sections. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Page locks keep pages of metadata flushed at runtime consistent. They are a property of how a metadata segment is persisted, not of cache concurrency. Let raw own them, and drop the page lock callbacks and the collision lock interface from metadata concurrency. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Initialize synchronization primitives only for metadata segments that use flush_async and block asynchronous flush for all the other segments. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
The metadata lock protects cache mapping consistency, which is a concern of the concurrency layer, not of metadata itself. Move its definition to concurrency/ocf_metadata_lock.h and its instance from struct ocf_metadata to struct ocf_cache. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
The metadata lock lives as long as the cache, so initialize it together with other cache locks in mngt, and do the attach-time part in ocf_concurrency_init(). Metadata no longer initializes or uses the metadata lock. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Also rename metadata_structs.h to metadata_priv.h, as the role of the header changed recently. Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
robertbaldyga
force-pushed
the
metadata-concurrency-decouple
branch
from
October 7, 2026 22:08
b0daf75 to
0477530
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.