summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/xlator.c17
-rw-r--r--libglusterfs/src/xlator.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 002cf90a9e3..61f8f6f4eab 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -807,6 +807,23 @@ xlator_fini_rec (xlator_t *xl)
}
+int
+xlator_notify (xlator_t *xl, int event, void *data, ...)
+{
+ xlator_t *old_THIS = NULL;
+ int ret = 0;
+
+ old_THIS = THIS;
+ THIS = xl;
+
+ ret = xl->notify (xl, event, data);
+
+ THIS = old_THIS;
+
+ return ret;
+}
+
+
void
xlator_tree_fini (xlator_t *xl)
{
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index b9555ffd5e8..ffbb6a0f84f 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -60,6 +60,7 @@ typedef int32_t (*event_notify_fn_t) (xlator_t *this,
#include "iobuf.h"
#include "inode.h"
#include "fd.h"
+#include "globals.h"
struct _loc {
const char *path;
@@ -871,6 +872,7 @@ int32_t xlator_set_type (xlator_t *xl, const char *type);
xlator_t *file_to_xlator_tree (glusterfs_ctx_t *ctx,
FILE *fp);
+int xlator_notify (xlator_t *this, int32_t event, void *data, ...);
int32_t xlator_tree_init (xlator_t *xl);
int32_t xlator_tree_free (xlator_t *xl);