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 --- api/src/glfs-master.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'api/src/glfs-master.c') diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c index 5c833b6106c..b4473b16604 100644 --- a/api/src/glfs-master.c +++ b/api/src/glfs-master.c @@ -169,6 +169,21 @@ struct xlator_dumpops dumpops; struct xlator_fops fops; -struct xlator_cbks cbks = {.forget = glfs_forget, - .release = glfs_release, - .releasedir = glfs_releasedir}; +struct xlator_cbks cbks = { + .forget = glfs_forget, + .release = glfs_release, + .releasedir = glfs_releasedir, +}; + +xlator_api_t xlator_api = { + .init = init, + .fini = fini, + .notify = notify, + .mem_acct_init = mem_acct_init, + .op_version = {1}, + .dumpops = &dumpops, + .fops = &fops, + .cbks = &cbks, + .identifier = "glfs-api", + .category = GF_MAINTAINED, +}; -- cgit