summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/xlator.c17
-rw-r--r--libglusterfs/src/xlator.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 61f8f6f4eab..0f76d9c7fe7 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -824,6 +824,23 @@ xlator_notify (xlator_t *xl, int event, void *data, ...)
}
+int
+xlator_init (xlator_t *xl)
+{
+ xlator_t *old_THIS = NULL;
+ int ret = 0;
+
+ old_THIS = THIS;
+ THIS = xl;
+
+ ret = xl->init (xl);
+
+ 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 ffbb6a0f84f..2bacc04577c 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -873,6 +873,7 @@ xlator_t *file_to_xlator_tree (glusterfs_ctx_t *ctx,
FILE *fp);
int xlator_notify (xlator_t *this, int32_t event, void *data, ...);
+int xlator_init (xlator_t *this);
int32_t xlator_tree_init (xlator_t *xl);
int32_t xlator_tree_free (xlator_t *xl);