statistics error handling in standby mode
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
569dfd1518
commit
91866a4efe
@ -1305,8 +1305,9 @@ int core_params_get(unsigned int cache_id, unsigned int core_id,
|
|||||||
cas_printf(LOG_ERR, "Cache id %d not running\n", cache_id);
|
cas_printf(LOG_ERR, "Cache id %d not running\n", cache_id);
|
||||||
else if (cmd.ext_err_code == OCF_ERR_CORE_NOT_AVAIL)
|
else if (cmd.ext_err_code == OCF_ERR_CORE_NOT_AVAIL)
|
||||||
cas_printf(LOG_ERR, "Core id %d not available\n", core_id);
|
cas_printf(LOG_ERR, "Core id %d not available\n", core_id);
|
||||||
else
|
else {
|
||||||
cas_printf(LOG_ERR, "Can't get parameters\n");
|
print_err(cmd.ext_err_code);
|
||||||
|
}
|
||||||
fclose(intermediate_file[0]);
|
fclose(intermediate_file[0]);
|
||||||
fclose(intermediate_file[1]);
|
fclose(intermediate_file[1]);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
@ -488,6 +488,7 @@ int cache_stats_ioclasses(int ctrl_fd, const struct kcas_cache_info *cache_info,
|
|||||||
io_class_id);
|
io_class_id);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
} else if (ret) {
|
} else if (ret) {
|
||||||
|
print_err(info.ext_err_code);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,8 +513,10 @@ int cache_stats_ioclasses(int ctrl_fd, const struct kcas_cache_info *cache_info,
|
|||||||
ret = ioctl(ctrl_fd, KCAS_IOCTL_PARTITION_INFO, &info);
|
ret = ioctl(ctrl_fd, KCAS_IOCTL_PARTITION_INFO, &info);
|
||||||
if (info.ext_err_code == OCF_ERR_IO_CLASS_NOT_EXIST)
|
if (info.ext_err_code == OCF_ERR_IO_CLASS_NOT_EXIST)
|
||||||
continue;
|
continue;
|
||||||
else if (ret)
|
else if (ret) {
|
||||||
|
print_err(info.ext_err_code);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ioctl(ctrl_fd, KCAS_IOCTL_GET_STATS, &stats);
|
ret = ioctl(ctrl_fd, KCAS_IOCTL_GET_STATS, &stats);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user