From e1be6195464836dd910e3b62f518c897dd06740d Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 14 Apr 2011 16:35:00 +0000 Subject: glusterd/volgen: refactor some things - use macros for exported volume tunables - introduce glusterd_volinfo_get_boolean as retrieval of boolean optuions was a recurring pattern and became somewhat cumbersome Also fixed illegal access to volinfo dict. @pranith: use always the glusterd_volinfo_get* API for that purpose so that defaults are taken to consideration. Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2757 (refactory gsync/gsyncd/syncdaemon/whatever to geo-replication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2757 --- xlators/mgmt/glusterd/src/glusterd-volgen.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (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 7028ea7b6..9e90b4130 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.h +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h @@ -27,10 +27,20 @@ #include "glusterd.h" +/* volopt map key name definitions */ + +#define VKEY_DIAG_CNT_FOP_HITS "diagnostics.count-fop-hits" +#define VKEY_DIAG_LAT_MEASUREMENT "diagnostics.latency-measurement" +#define VKEY_FEATURES_LIMIT_USAGE "features.limit-usage" +#define VKEY_MARKER_XTIME "features.marker-gsync" +#define VKEY_FEATURES_QUOTA "features.quota" +#define VKEY_PERF_STAT_PREFETCH "performance.stat-prefetch" + typedef enum gd_volopt_flags_ { OPT_FLAG_NONE, OPT_FLAG_FORCE = 1, } gd_volopt_flags_t; + int glusterd_create_rb_volfiles (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo); @@ -44,6 +54,7 @@ int glusterd_delete_volfile (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo); int glusterd_volinfo_get (glusterd_volinfo_t *volinfo, char *key, char **value); +int glusterd_volinfo_get_boolean (glusterd_volinfo_t *volinfo, char *key); int glusterd_validate_globalopts (glusterd_volinfo_t *volinfo, dict_t *val_dict, char **op_errstr); -- cgit