Skip to content

Conversation

@andreatomassetti
Copy link

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

Signed-off-by: Andrea Tomassetti andrea.tomassetti@devo.com

Signed-off-by: Andrea Tomassetti <andrea.tomassetti@devo.com>
@CAS-Linux-Jenkins
Copy link

Can one of the admins verify this patch?


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