Add "remove inactive" command to casadm

Add `remove_inactive_core` function to casadm's code
to handle `remove inactive` command.
Print messages based on errors returned when command fails.
Add documentation comment to new function.
Add CLI part of introduced command.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir Jankowski
2021-02-17 15:59:11 +01:00
parent 760b60628c
commit 2514f5fa5b
3 changed files with 85 additions and 0 deletions

View File

@@ -215,6 +215,15 @@ int get_core_info(int fd, int cache_id, int core_id, struct kcas_core_info *info
int remove_core(unsigned int cache_id, unsigned int core_id,
bool detach, bool force_no_flush);
/**
* @brief remove inactive core device from a cache
*
* @param cache_id cache from which inactive core is being removed
* @param cache_id inactive core which is being removed
* @return 0 upon successful core removal, 1 upon failure
*/
int remove_inactive_core(unsigned int cache_id, unsigned int core_id);
int core_pool_remove(const char *core_device);
int get_core_pool_count(int fd);