From 42a9d608d5acbe8526050d23682071171d65da3b Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Thu, 21 Mar 2013 19:02:52 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/4709 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/xlator.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libglusterfs/src/xlator.h') diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 607f0dcec..2567fc70c 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 ...) \ -- cgit