failover detach

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2021-10-07 12:58:42 +02:00
committed by ajrutkow
parent 86c7a9f5ae
commit 90d8584bd7
9 changed files with 382 additions and 107 deletions

View File

@@ -36,8 +36,7 @@
#define CACHE_INIT_NEW 0 /**< initialize new metadata from fresh start */
#define CACHE_INIT_LOAD 1 /**< load existing metadata */
#define CACHE_INIT_BIND 2 /**< bind existing metadata */
#define CACHE_INIT_ACTIVATE 3 /**< activate cache after bind */
#define CACHE_INIT_STANDBY 2 /**< initialize failover standby cache */
struct kcas_start_cache {
/**
@@ -353,6 +352,21 @@ struct kcas_get_cache_param {
int ext_err_code;
};
struct kcas_failover_detach
{
uint16_t cache_id;
int ext_err_code;
};
struct kcas_failover_activate
{
uint16_t cache_id;
char cache_path[MAX_STR_LEN]; /**< path to an ssd*/
int ext_err_code;
};
/*******************************************************************************
* CODE * NAME * STATUS *
*******************************************************************************
@@ -483,6 +497,12 @@ struct kcas_get_cache_param {
/** Remove inactive core object from an running cache instance */
#define KCAS_IOCTL_REMOVE_INACTIVE _IOWR(KCAS_IOCTL_MAGIC, 37, struct kcas_remove_inactive)
/** Detach caching drive from failover standby cache instance */
#define KCAS_IOCTL_FAILOVER_DETACH _IOWR(KCAS_IOCTL_MAGIC, 38, struct kcas_failover_detach)
/** Activate standby failover cache instance */
#define KCAS_IOCTL_FAILOVER_ACTIVATE _IOWR(KCAS_IOCTL_MAGIC, 39, struct kcas_failover_activate)
/**
* Extended kernel CAS error codes
*/