From 2cca000fcc2adbffbb3f5258c57ae564b9e2d51f Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Sat, 30 Apr 2016 18:00:44 +0530 Subject: protocol: add getactivelk () fop Change-Id: Ie38198db990f133fe163ba160cdf647e34f83f4f BUG: 1326085 Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/13994 Reviewed-by: Niels de Vos Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/protocol/client/src/client.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'xlators/protocol/client/src/client.c') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index c37c1e25b44..4810f75ac25 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2066,6 +2066,33 @@ out: return 0; } +int32_t +client_getactivelk (call_frame_t *frame, xlator_t *this, loc_t *loc, + dict_t *xdata) +{ + int ret = -1; + clnt_conf_t *conf = NULL; + rpc_clnt_procedure_t *proc = NULL; + clnt_args_t args = {0,}; + + conf = this->private; + if (!conf || !conf->fops) + goto out; + + + args.loc = loc; + args.xdata = xdata; + + proc = &conf->fops->proctable[GF_FOP_GETACTIVELK]; + if (proc->fn) + ret = proc->fn (frame, this, &args); +out: + if (ret) + STACK_UNWIND_STRICT (getactivelk, frame, -1, ENOTCONN, NULL, + NULL); + + return 0; +} int32_t client_getspec (call_frame_t *frame, xlator_t *this, const char *key, @@ -2893,6 +2920,7 @@ struct xlator_fops fops = { .seek = client_seek, .lease = client_lease, .compound = client_compound, + .getactivelk = client_getactivelk, }; -- cgit