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/nfs/server/src/nfs.c | 19 +++++++++++++++++-- xlators/nfs/server/src/nfsserver.sym | 10 +--------- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'xlators/nfs/server') diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index ceb4943bc93..3dbe3c7cea1 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -1529,7 +1529,7 @@ notify(xlator_t *this, int32_t event, void *data, ...) return 0; } -int +void fini(xlator_t *this) { struct nfs_state *nfs = NULL; @@ -1539,7 +1539,7 @@ fini(xlator_t *this) gf_msg_debug(GF_NFS, 0, "NFS service going down"); nfs_deinit_versions(&nfs->versions, this); GF_FREE(this->instance_name); - return 0; + return; } int32_t @@ -2040,3 +2040,18 @@ struct volume_options options[] = { }, {.key = {NULL}}, }; + +xlator_api_t xlator_api = { + .init = init, + .fini = fini, + .notify = notify, + .reconfigure = reconfigure, + .mem_acct_init = mem_acct_init, + .op_version = {1}, + .dumpops = &dumpops, + .fops = &fops, + .cbks = &cbks, + .options = options, + .identifier = "gnfs", + .category = GF_MAINTAINED, +}; diff --git a/xlators/nfs/server/src/nfsserver.sym b/xlators/nfs/server/src/nfsserver.sym index 2126634962a..dce7d964e9e 100644 --- a/xlators/nfs/server/src/nfsserver.sym +++ b/xlators/nfs/server/src/nfsserver.sym @@ -1,12 +1,3 @@ -init -fini -fops -cbks -options -notify -mem_acct_init -reconfigure -dumpops exp_file_parse exp_file_print exp_file_get_dir @@ -18,3 +9,4 @@ ng_file_parse ng_file_get_netgroup ng_file_print ng_file_deinit +xlator_api -- cgit