From af7e957b4954bd84b8f7df6bfbd59c939092ead2 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 6 Dec 2018 16:24:52 +0530 Subject: xlator: make 'xlator_api' mandatory * Remove the options to load old symbol. * keep only 'xlator_api' symbol from being exported using xlator.sym * add xlator_api to all the xlators where its missing NOTE: This covers all the xlators which has at least a test case to validate its loading. If there is a translator, which doesn't have any test, then we should probably remove that from codebase. fixes: #164 Change-Id: Ibcdc8c9844cda6b4463d907a15813745d14c1ebb Signed-off-by: Amar Tumballi --- xlators/features/quota/src/Makefile.am | 5 +---- xlators/features/quota/src/quotad.c | 22 ++++++++++++++++------ xlators/features/quota/src/quotad.sym | 7 ------- 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 xlators/features/quota/src/quotad.sym (limited to 'xlators/features/quota/src') diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am index 0ae47fc189f..1c2dcef0ca3 100644 --- a/xlators/features/quota/src/Makefile.am +++ b/xlators/features/quota/src/Makefile.am @@ -4,7 +4,7 @@ endif xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features quota_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) -quotad_la_LDFLAGS = -module -export-symbols $(top_srcdir)/xlators/features/quota/src/quotad.sym $(GF_XLATOR_LDFLAGS) +quotad_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) quota_la_SOURCES = quota.c quota-enforcer-client.c quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ @@ -27,6 +27,3 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ AM_CFLAGS = -Wall $(GF_CFLAGS) CLEANFILES = - -EXTRA_DIST = quotad.sym - diff --git a/xlators/features/quota/src/quotad.c b/xlators/features/quota/src/quotad.c index cfc74ff6985..ee1a600e60f 100644 --- a/xlators/features/quota/src/quotad.c +++ b/xlators/features/quota/src/quotad.c @@ -220,11 +220,6 @@ err: return ret; } -class_methods_t class_methods = {.init = qd_init, - .fini = qd_fini, - .reconfigure = qd_reconfigure, - .notify = qd_notify}; - struct xlator_fops fops = {}; struct xlator_cbks cbks = {}; @@ -240,4 +235,19 @@ struct volume_options options[] = { .key = {"transport.*"}, .type = GF_OPTION_TYPE_ANY, }, - {.key = {NULL}}}; + {.key = {NULL}}, +}; + +xlator_api_t xlator_api = { + .init = qd_init, + .fini = qd_fini, + .reconfigure = qd_reconfigure, + .notify = qd_notify, + .mem_acct_init = mem_acct_init, + .op_version = {1}, + .fops = &fops, + .cbks = &cbks, + .options = options, + .identifier = "quotad", + .category = GF_MAINTAINED, +}; diff --git a/xlators/features/quota/src/quotad.sym b/xlators/features/quota/src/quotad.sym deleted file mode 100644 index 0829ffe1584..00000000000 --- a/xlators/features/quota/src/quotad.sym +++ /dev/null @@ -1,7 +0,0 @@ -fops -cbks -class_methods -options -mem_acct_init -reconfigure -dumpops -- cgit