From abc8e5b01bff976e1f6b3c1e2747a2a341bf0f64 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Mon, 3 Sep 2012 16:51:06 +0530 Subject: glusterd: 'volume set' changes for op-version support An op-version check is performed for the given keys during stage. The commit phase moves the cluster op-version to the required version if needed. Change-Id: Id5c387094dbec723df736b2ecdc49ff93c179e0e BUG: 814534 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/3780 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-volgen.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h index f8279f6c9..39e19e5a8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.h +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h @@ -24,7 +24,6 @@ #define VKEY_FEATURES_LIMIT_USAGE "features.limit-usage" #define VKEY_MARKER_XTIME GEOREP".indexing" #define VKEY_FEATURES_QUOTA "features.quota" -#define VKEY_PERF_STAT_PREFETCH "performance.stat-prefetch" typedef enum { GF_CLIENT_TRUSTED, @@ -56,6 +55,17 @@ typedef enum gd_volopt_flags_ { OPT_FLAG_FORCE = 1, } gd_volopt_flags_t; +typedef enum { DOC, NO_DOC, GLOBAL_DOC, GLOBAL_NO_DOC } option_type_t; + +struct volopt_map_entry { + char *key; + char *voltype; + char *option; + char *value; + option_type_t type; + uint32_t flags; + uint32_t op_version; +}; int glusterd_create_rb_volfiles (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo); @@ -88,4 +98,7 @@ char* glusterd_get_trans_type_rb (gf_transport_type ttype); int glusterd_check_nfs_volfile_identical (gf_boolean_t *identical); + +uint32_t +glusterd_get_op_version_for_key (char *key); #endif -- cgit