casadm: '-' instead of dev path for detached cache
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
parent
6a1187a8b3
commit
9f5a9f0d62
@ -2688,6 +2688,7 @@ int list_caches(unsigned int list_format, bool by_id_path)
|
|||||||
char cache_ctrl_dev[MAX_STR_LEN] = "-";
|
char cache_ctrl_dev[MAX_STR_LEN] = "-";
|
||||||
float cache_flush_prog;
|
float cache_flush_prog;
|
||||||
float core_flush_prog;
|
float core_flush_prog;
|
||||||
|
bool cache_device_detached;
|
||||||
|
|
||||||
if (!by_id_path && !curr_cache->standby_detached) {
|
if (!by_id_path && !curr_cache->standby_detached) {
|
||||||
if (get_dev_path(curr_cache->device, curr_cache->device,
|
if (get_dev_path(curr_cache->device, curr_cache->device,
|
||||||
@ -2719,11 +2720,16 @@ int list_caches(unsigned int list_format, bool by_id_path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cache_device_detached =
|
||||||
|
((curr_cache->state & (1 << ocf_cache_state_standby)) |
|
||||||
|
(curr_cache->state & (1 << ocf_cache_state_detached)))
|
||||||
|
;
|
||||||
|
|
||||||
fprintf(intermediate_file[1], TAG(TREE_BRANCH)
|
fprintf(intermediate_file[1], TAG(TREE_BRANCH)
|
||||||
"%s,%u,%s,%s,%s,%s\n",
|
"%s,%u,%s,%s,%s,%s\n",
|
||||||
"cache", /* type */
|
"cache", /* type */
|
||||||
curr_cache->id, /* id */
|
curr_cache->id, /* id */
|
||||||
curr_cache->standby_detached ? "-" : curr_cache->device, /* device path */
|
cache_device_detached ? "-" : curr_cache->device, /* device path */
|
||||||
tmp_status, /* cache status */
|
tmp_status, /* cache status */
|
||||||
mode_string, /* write policy */
|
mode_string, /* write policy */
|
||||||
cache_ctrl_dev /* device */);
|
cache_ctrl_dev /* device */);
|
||||||
|
Loading…
Reference in New Issue
Block a user