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 'wi' (Write-Invalidate) as valid cache mode #1148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreatomassetti
Copy link

When enabling experimental Write-Invalidate cache mode, casctl init fails without this patch.

Signed-off-by: Andrea Tomassetti [email protected]

@CAS-Linux-Jenkins
Copy link

Can one of the admins verify this patch?

@@ -292,7 +292,7 @@ def check_cache_device_empty(self):
)

def check_cache_mode_valid(self, cache_mode):
if cache_mode not in ['wt', 'pt', 'wa', 'wb', 'wo']:
if cache_mode not in ['wt', 'pt', 'wa', 'wb', 'wo', 'wi']:
Copy link
Member

Choose a reason for hiding this comment

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

On the other hand when experimental features are disabled (which is default), WI should not be recognized as a valid cache mode. This option should be accepted only conditionally. The problem is that we currently do not have any good way to recognize whether OpenCAS was compiled with experimental features enabled, so this is another thing to be implemented in order to make casctl work with Write-Invalidate.

Copy link
Author

Choose a reason for hiding this comment

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

Shouldn't, at some point, some C function fails if WI was not enabled during compile time? Making this patch "safe" even when WI is disabled? For example:

inline int validate_str_cache_mode(const char *s)

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