summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2013-03-21 19:02:52 -0400
committerAnand Avati <avati@redhat.com>2013-04-03 15:14:27 -0700
commit42a9d608d5acbe8526050d23682071171d65da3b (patch)
treec4804c796c68ba9ad7bf8ef264ec4cf4eb66383a /libglusterfs/src/xlator.h
parent6fc4820ae8d8f06c05616a4ac3cc8f296ce42ecf (diff)
core: add dispatch table for init/fini
This adds a layer of indirection so that derivative translators such as NUFA and switch can refer to the parent's init/fini (in both cases DHT's) without having to create stub functions. Change-Id: I1af1fea70a9ddd2aa20485af7ae65f9660f19dd6 BUG: 924490 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4709 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 607f0dcecee..2567fc70c48 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -827,6 +827,11 @@ struct _xlator {
gf_boolean_t is_autoloaded;
};
+typedef struct {
+ int32_t (*init) (xlator_t *this);
+ void (*fini) (xlator_t *this);
+} class_methods_t;
+
#define xlator_has_parent(xl) (xl->parents != NULL)
#define XLATOR_NOTIFY(_xl, params ...) \