diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.h')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.h b/xlators/mgmt/glusterd/src/glusterd-store.h index e60be6e7c91..83f4df0783e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.h +++ b/xlators/mgmt/glusterd/src/glusterd-store.h @@ -28,6 +28,8 @@ typedef enum glusterd_store_ver_ac_ { GLUSTERD_VOLINFO_VER_AC_DECREMENT = 2, } glusterd_volinfo_ver_ac_t; +#define UUID_SIZE 36 +#define VOLINFO_BUFFER_SIZE 4093 #define GLUSTERD_STORE_UUID_KEY "UUID" #define GLUSTERD_STORE_KEY_VOL_TYPE "type" @@ -40,7 +42,9 @@ typedef enum glusterd_store_ver_ac_ { #define GLUSTERD_STORE_KEY_VOL_DISPERSE_CNT "disperse_count" #define GLUSTERD_STORE_KEY_VOL_REDUNDANCY_CNT "redundancy_count" #define GLUSTERD_STORE_KEY_VOL_ARBITER_CNT "arbiter_count" +#define GLUSTERD_STORE_KEY_VOL_THIN_ARBITER_CNT "thin_arbiter_count" #define GLUSTERD_STORE_KEY_VOL_BRICK "brick" +#define GLUSTERD_STORE_KEY_VOL_TA_BRICK "ta-brick" #define GLUSTERD_STORE_KEY_VOL_VERSION "version" #define GLUSTERD_STORE_KEY_VOL_TRANSPORT "transport-type" #define GLUSTERD_STORE_KEY_VOL_ID "volume-id" @@ -59,17 +63,6 @@ typedef enum glusterd_store_ver_ac_ { #define GLUSTERD_STORE_KEY_VOL_CLIENT_OP_VERSION "client-op-version" #define GLUSTERD_STORE_KEY_VOL_QUOTA_VERSION "quota-version" -#define GLUSTERD_STORE_KEY_VOL_TIER_STATUS "tier_status" -#define GLUSTERD_STORE_KEY_TIER_DETACH_OP "tier_op" -#define GLUSTERD_STORE_KEY_COLD_TYPE "cold_type" -#define GLUSTERD_STORE_KEY_COLD_COUNT "cold_count" -#define GLUSTERD_STORE_KEY_COLD_REPLICA_COUNT "cold_replica_count" -#define GLUSTERD_STORE_KEY_COLD_DISPERSE_COUNT "cold_disperse_count" -#define GLUSTERD_STORE_KEY_COLD_REDUNDANCY_COUNT "cold_redundancy_count" -#define GLUSTERD_STORE_KEY_HOT_TYPE "hot_type" -#define GLUSTERD_STORE_KEY_HOT_COUNT "hot_count" -#define GLUSTERD_STORE_KEY_HOT_REPLICA_COUNT "hot_replica_count" - #define GLUSTERD_STORE_KEY_SNAP_NAME "name" #define GLUSTERD_STORE_KEY_SNAP_ID "snap-id" #define GLUSTERD_STORE_KEY_SNAP_DESC "desc" @@ -101,8 +94,7 @@ typedef enum glusterd_store_ver_ac_ { #define GLUSTERD_STORE_KEY_PEER_UUID "uuid" #define GLUSTERD_STORE_KEY_PEER_HOSTNAME "hostname" #define GLUSTERD_STORE_KEY_PEER_STATE "state" - -#define GLUSTERD_STORE_KEY_VOL_CAPS "caps" +#define GLUSTERD_STORE_KEY_VOL_CAPS "caps" /* left just for backward compat */ #define GLUSTERD_STORE_KEY_VOL_DEFRAG_REB_FILES "rebalanced-files" #define GLUSTERD_STORE_KEY_VOL_DEFRAG_SIZE "size" @@ -118,6 +110,21 @@ typedef enum glusterd_store_ver_ac_ { #define GLUSTERD_STORE_KEY_VOL_MIGRATIONS_SKIPPED "migration-skipped" #define GLUSTERD_STORE_KEY_VOL_MIGRATION_RUN_TIME "migration-run-time" +#define GLUSTERD_STORE_KEY_GANESHA_GLOBAL "nfs-ganesha" + +/* + * The structure is responsible for handling the parameter for writes into + * the buffer before it is finally written to the file. The writes will be + * of the form of key-value pairs. + */ +struct glusterd_volinfo_data_store_ { + gf_store_handle_t *shandle; /*Contains fd and path of the file */ + int16_t buffer_len; + char key_check; /* flag to check if key is to be validated before write*/ + char buffer[VOLINFO_BUFFER_SIZE]; +}; +typedef struct glusterd_volinfo_data_store_ glusterd_volinfo_data_store_t; + int32_t glusterd_store_volinfo(glusterd_volinfo_t *volinfo, glusterd_volinfo_ver_ac_t ac); @@ -177,9 +184,6 @@ void glusterd_replace_slash_with_hyphen(char *str); int32_t -glusterd_store_perform_volume_store(glusterd_volinfo_t *volinfo); - -int32_t glusterd_store_create_quota_conf_sh_on_absence(glusterd_volinfo_t *volinfo); int |
