Do not print exported object path if it was removed
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -1567,7 +1567,7 @@ int cache_mngt_remove_core_from_cache(struct kcas_remove_core *cmd)
|
||||
|
||||
wait_for_completion(&context.cmpl);
|
||||
|
||||
if (!result && !cmd->detach)
|
||||
if (result != -OCF_ERR_CORE_NOT_REMOVED && !cmd->detach)
|
||||
mark_core_id_free(cache, cmd->core_id);
|
||||
|
||||
unlock:
|
||||
@@ -3123,6 +3123,8 @@ int cache_mngt_get_core_info(struct kcas_core_info *info)
|
||||
ocf_cache_t cache;
|
||||
ocf_core_t core;
|
||||
const struct ocf_volume_uuid *uuid;
|
||||
ocf_volume_t vol;
|
||||
struct bd_object *bdvol;
|
||||
int result;
|
||||
|
||||
result = mngt_get_cache_by_id(cas_ctx, info->cache_id, &cache);
|
||||
@@ -3152,6 +3154,10 @@ int cache_mngt_get_core_info(struct kcas_core_info *info)
|
||||
|
||||
info->state = ocf_core_get_state(core);
|
||||
|
||||
vol = ocf_core_get_volume(core);
|
||||
bdvol = bd_object(vol);
|
||||
info->exp_obj_exists = bdvol->expobj_valid;
|
||||
|
||||
unlock:
|
||||
ocf_mngt_cache_read_unlock(cache);
|
||||
put:
|
||||
|
||||
@@ -205,6 +205,8 @@ struct kcas_core_info {
|
||||
|
||||
ocf_core_state_t state;
|
||||
|
||||
bool exp_obj_exists;
|
||||
|
||||
int ext_err_code;
|
||||
};
|
||||
|
||||
@@ -393,7 +395,7 @@ struct kcas_standby_activate
|
||||
* 22 * KCAS_IOCTL_INSERT_CORE * OK *
|
||||
* 23 * KCAS_IOCTL_REMOVE_CORE * OK *
|
||||
* 24 * KCAS_IOCTL_CACHE_INFO * OK *
|
||||
* 25 * KCAS_IOCTL_CORE_INFO * OK *
|
||||
* 25 * KCAS_IOCTL_CORE_INFO * DEPERCATED *
|
||||
* 26 * KCAS_IOCTL_GET_CORE_POOL_COUNT * OK *
|
||||
* 27 * KCAS_IOCTL_GET_CORE_POOL_PATHS * OK *
|
||||
* 28 * KCAS_IOCTL_CORE_POOL_REMOVE * OK *
|
||||
@@ -408,6 +410,7 @@ struct kcas_standby_activate
|
||||
* 37 * KCAS_IOCTL_REMOVE_INACTIVE * OK *
|
||||
* 38 * KCAS_IOCTL_STANDBY_DETACH * OK *
|
||||
* 39 * KCAS_IOCTL_STANDBY_ACTIVATE * OK *
|
||||
* 40 * KCAS_IOCTL_CORE_INFO * OK *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
@@ -459,9 +462,6 @@ struct kcas_standby_activate
|
||||
/** Retrieve properties of a running cache instance (incl. mode etc.) */
|
||||
#define KCAS_IOCTL_CACHE_INFO _IOWR(KCAS_IOCTL_MAGIC, 24, struct kcas_cache_info)
|
||||
|
||||
/** Rretrieve statisting of a given core object */
|
||||
#define KCAS_IOCTL_CORE_INFO _IOWR(KCAS_IOCTL_MAGIC, 25, struct kcas_core_info)
|
||||
|
||||
/** Get core pool count */
|
||||
#define KCAS_IOCTL_GET_CORE_POOL_COUNT _IOR(KCAS_IOCTL_MAGIC, 26, struct kcas_core_pool_count)
|
||||
|
||||
@@ -506,6 +506,9 @@ struct kcas_standby_activate
|
||||
/** Activate failover standby cache instance */
|
||||
#define KCAS_IOCTL_STANDBY_ACTIVATE _IOWR(KCAS_IOCTL_MAGIC, 39, struct kcas_standby_activate)
|
||||
|
||||
/** Rretrieve statisting of a given core object */
|
||||
#define KCAS_IOCTL_CORE_INFO _IOWR(KCAS_IOCTL_MAGIC, 40, struct kcas_core_info)
|
||||
|
||||
/**
|
||||
* Extended kernel CAS error codes
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user