Merge pull request #1310 from pdebski21/fix_standby_detach_error_msg
Fix error message when CAS already is in standby detach state
This commit is contained in:
commit
4fc0c4f8bb
@ -282,6 +282,10 @@ struct {
|
|||||||
"The cache contains dirty data assigned to the core. If you want to "
|
"The cache contains dirty data assigned to the core. If you want to "
|
||||||
"continue, please use --force option.\nWarning: the data will be lost"
|
"continue, please use --force option.\nWarning: the data will be lost"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
KCAS_ERR_STANDBY_DETACHED,
|
||||||
|
"Cache device is already in standby detached state."
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *cas_strerr(int cas_error_code)
|
const char *cas_strerr(int cas_error_code)
|
||||||
|
@ -2296,7 +2296,7 @@ int cache_mngt_standby_detach(struct kcas_standby_detach *cmd)
|
|||||||
|
|
||||||
cache_priv = ocf_cache_get_priv(cache);
|
cache_priv = ocf_cache_get_priv(cache);
|
||||||
if (!cache_priv->cache_exp_obj_initialized) {
|
if (!cache_priv->cache_exp_obj_initialized) {
|
||||||
result = -KCAS_ERR_DETACHED;
|
result = -KCAS_ERR_STANDBY_DETACHED;
|
||||||
goto out_cache_put;
|
goto out_cache_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(c) 2012-2021 Intel Corporation
|
* Copyright(c) 2012-2022 Intel Corporation
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -557,6 +557,9 @@ enum kcas_error {
|
|||||||
/** Removing core failed and rollback failed too */
|
/** Removing core failed and rollback failed too */
|
||||||
KCAS_ERR_DETACHED,
|
KCAS_ERR_DETACHED,
|
||||||
|
|
||||||
|
/** Cache is already in standby detached state */
|
||||||
|
KCAS_ERR_STANDBY_DETACHED,
|
||||||
|
|
||||||
/** Cache has been stopped, but it may contain dirty data */
|
/** Cache has been stopped, but it may contain dirty data */
|
||||||
KCAS_ERR_STOPPED_DIRTY,
|
KCAS_ERR_STOPPED_DIRTY,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user