summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.h
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-14 16:35:00 +0000
committerAnand Avati <avati@gluster.com>2011-04-15 00:31:04 -0700
commite1be6195464836dd910e3b62f518c897dd06740d (patch)
treec7d6a4ccc6f9cb3413957194eb36b7384a92b499 /xlators/mgmt/glusterd/src/glusterd-volgen.h
parent066074291fad64a78923bbca06d25b5a6a5307d7 (diff)
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 <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2757 (refactory gsync/gsyncd/syncdaemon/whatever to geo-replication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2757
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h
index 7028ea7b603..9e90b413019 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);