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/leases/src/leases.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'xlators/features/leases') diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c index baeb8c7361c..de74312b0ba 100644 --- a/xlators/features/leases/src/leases.c +++ b/xlators/features/leases/src/leases.c @@ -1000,14 +1000,14 @@ out: return ret; } -int +void fini(xlator_t *this) { leases_private_t *priv = NULL; priv = this->private; if (!priv) { - return 0; + return; } this->private = NULL; @@ -1024,7 +1024,7 @@ fini(xlator_t *this) glusterfs_ctx_tw_put(this->ctx); this->ctx->tw = NULL; } - return 0; + return; } static int @@ -1135,3 +1135,16 @@ struct volume_options options[] = { " will be forcefully purged by the server."}, {.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 */ + .fops = &fops, + .cbks = &cbks, + .options = options, + .identifier = "leases", + .category = GF_MAINTAINED, +}; -- cgit