summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-02-16 21:30:47 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-20 21:23:37 -0800
commit81ab6622d403558cd6f31efeb535fe886d3beeaa (patch)
tree7e30ec6d7ee51e957a50c98741f0a3a7118b5dfa /libglusterfs
parent5f117a4a1fca3ec2d163fe77615cf6859c0450e4 (diff)
cluster/afr: Add commands to see self-heald ops
Change-Id: Id92d3276e65a6c0fe61ab328b58b3954ae116c74 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/globals.c2
-rw-r--r--libglusterfs/src/glusterfs.h3
-rw-r--r--libglusterfs/src/xlator.h12
3 files changed, 14 insertions, 3 deletions
diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c
index 9355a3a..e041ce5 100644
--- a/libglusterfs/src/globals.c
+++ b/libglusterfs/src/globals.c
@@ -395,7 +395,7 @@ char eventstring[GF_EVENT_MAXVAL+1][64] = {
"Volfile Modified",
"New Volfile",
"Translator Info",
- "Trigger Volume Heal",
+ "Xlator Op",
"Authentication Failed",
"Invalid event",
};
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 076833d..63c28b8 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -385,7 +385,7 @@ typedef enum {
GF_EVENT_VOLFILE_MODIFIED,
GF_EVENT_GRAPH_NEW,
GF_EVENT_TRANSLATOR_INFO,
- GF_EVENT_TRIGGER_HEAL,
+ GF_EVENT_TRANSLATOR_OP,
GF_EVENT_AUTH_FAILED,
GF_EVENT_VOLUME_DEFRAG,
GF_EVENT_MAXVAL,
@@ -403,7 +403,6 @@ struct gf_flock {
gf_lkowner_t l_owner;
};
-
extern char *glusterfs_strevent (glusterfs_event_t ev);
#define GF_MUST_CHECK __attribute__((warn_unused_result))
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 7604f8c..5e4216d 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -832,6 +832,18 @@ struct _xlator {
#define xlator_has_parent(xl) (xl->parents != NULL)
+#define XLATOR_NOTIFY(_xl, params ...) \
+ do { \
+ xlator_t *_old_THIS = NULL; \
+ \
+ _old_THIS = THIS; \
+ THIS = _xl; \
+ \
+ ret = _xl->notify (_xl, params);\
+ \
+ THIS = _old_THIS; \
+ } while (0);
+
int32_t xlator_set_type_virtual (xlator_t *xl, const char *type);
int32_t xlator_set_type (xlator_t *xl, const char *type);