Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing ocf_cache_mode_t to ocf_req_cache_mode_t conversions #798

Merged

Conversation

robertbaldyga
Copy link
Member

No description provided.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Copy link
Contributor

@rafalste rafalste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a need for such distinction if it's just type casting?

@robertbaldyga
Copy link
Member Author

Is there a need for such distinction if it's just type casting?

It's not just type casting. Value set of ocf_req_cache_mode_t is superset of ocf_cache_mode_t, which just so happens to have the same modes mapped to the same numerical values in both. This property is however an implementation detail (so that mapping is trivial), and it should not leak to the actual usages of both types.

@robertbaldyga robertbaldyga merged commit 283a897 into Open-CAS:master Jul 8, 2024
2 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.

3 participants