From 340e58f9b3bcdfe4314da65e592dcd5c2daf6fd9 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 28 Nov 2018 10:05:39 +0530 Subject: all: add xlator_api to many translators Fixes: #164 Change-Id: I93ad6f0232a1dc534df099059f69951e1339086f Signed-off-by: Amar Tumballi --- xlators/features/locks/src/posix.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'xlators/features/locks/src') diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 8112b1ec6ba..ce6b6f9fbfc 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -3741,19 +3741,19 @@ out: return ret; } -int +void fini(xlator_t *this) { posix_locks_private_t *priv = NULL; priv = this->private; if (!priv) - return 0; + return; this->private = NULL; GF_FREE(priv->brickname); GF_FREE(priv); - return 0; + return; } int @@ -4490,3 +4490,17 @@ struct volume_options options[] = { "be sent."}, {.key = {NULL}}, }; + +xlator_api_t xlator_api = { + .init = init, + .fini = fini, + .reconfigure = reconfigure, + .mem_acct_init = mem_acct_init, + .op_version = {1}, /* Present from the initial version */ + .dumpops = &dumpops, + .fops = &fops, + .cbks = &cbks, + .options = options, + .identifier = "locks", + .category = GF_MAINTAINED, +}; -- cgit