diff options
author | Susant Palai <spalai@redhat.com> | 2016-04-30 18:00:44 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-05-01 18:04:31 -0700 |
commit | 2cca000fcc2adbffbb3f5258c57ae564b9e2d51f (patch) | |
tree | 971db1740040b652d226987baf417a33bb8ab035 /xlators/protocol/client/src/client.c | |
parent | c823603f5aab0a60eb076ea43b869739745d9f21 (diff) |
protocol: add getactivelk () fop
Change-Id: Ie38198db990f133fe163ba160cdf647e34f83f4f
BUG: 1326085
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/13994
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/protocol/client/src/client.c')
-rw-r--r-- | xlators/protocol/client/src/client.c | 28 |
1 files changed, 28 insertions, 0 deletions
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, }; |