Standby state API changes

Don't print statistics for a cache in passive state
Passive cache - casadm set/get cache param disabled in passive state
Obsolete "cache_get_param" function removed
Error in layer_cache_management.c fixed
Flushing cache/core disabled with error for passive mode
Core addition disabled in passive mode
IO class setting disabled for passive mode
Counters reset disabled for passive mode
Ioctl handling changes to reflect OCF API changes

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This commit is contained in:
Krzysztof Majzerowicz-Jaszcz
2021-09-15 15:53:29 +02:00
parent 4e9ee56b78
commit 3185564869
4 changed files with 69 additions and 57 deletions

View File

@@ -628,6 +628,10 @@ static int cache_stats(int ctrl_fd, const struct kcas_cache_info *cache_info,
if (stats_filters & STATS_FILTER_CONF)
cache_stats_conf(ctrl_fd, cache_info, cache_id, outfile, by_id_path);
/* Don't print stats for a cache in standby state */
if (cache_info->info.state & (1 << ocf_cache_state_standby))
return SUCCESS;
if (stats_filters & STATS_FILTER_USAGE)
print_usage_stats(&cache_stats.usage, outfile);