summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-rpc-fops.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-07-01 22:47:46 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-07-05 22:55:43 +0000
commit06cdc956096440eebf9984312af7db6f842578fc (patch)
tree90c76819cec0ead9e9eda2722cb5e8c579e0db96 /xlators/protocol/client/src/client-rpc-fops.c
parent1d97e06da0225d2097335ae4cdf933f909683bac (diff)
protocol/client: handle the fdctx_destroy properly with different versions
while adding the new version of RPC, this part was not handled properly Updates: bz#1193929 Change-Id: If4cc4c2db075221b9ed731bacb7cc035f7007c5b Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-rpc-fops.c')
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 87401577ba9..cf2d913dd71 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -3049,80 +3049,6 @@ out:
return 0;
}
-int
-client_fdctx_destroy (xlator_t *this, clnt_fd_ctx_t *fdctx)
-{
- clnt_conf_t *conf = NULL;
- call_frame_t *fr = NULL;
- int32_t ret = -1;
- char parent_down = 0;
- fd_lk_ctx_t *lk_ctx = NULL;
-
- GF_VALIDATE_OR_GOTO ("client", this, out);
- GF_VALIDATE_OR_GOTO (this->name, fdctx, out);
-
- conf = (clnt_conf_t *) this->private;
-
- if (fdctx->remote_fd == -1) {
- gf_msg_debug (this->name, 0, "not a valid fd");
- goto out;
- }
-
- pthread_mutex_lock (&conf->lock);
- {
- parent_down = conf->parent_down;
- }
- pthread_mutex_unlock (&conf->lock);
- lk_ctx = fdctx->lk_ctx;
- fdctx->lk_ctx = NULL;
-
- if (lk_ctx)
- fd_lk_ctx_unref (lk_ctx);
-
- if (!parent_down)
- rpc_clnt_ref (conf->rpc);
- else
- goto out;
-
- fr = create_frame (this, this->ctx->pool);
- if (fr == NULL) {
- goto out;
- }
-
- ret = 0;
-
- if (fdctx->is_dir) {
- gfs3_releasedir_req req = {{0,},};
- memcpy (req.gfid, fdctx->gfid, 16);
- req.fd = fdctx->remote_fd;
- gf_msg_trace (this->name, 0, "sending releasedir on fd");
- client_submit_request (this, &req, fr, &clnt3_3_fop_prog,
- GFS3_OP_RELEASEDIR,
- client3_3_releasedir_cbk,
- NULL, NULL, 0, NULL, 0, NULL,
- (xdrproc_t)xdr_gfs3_releasedir_req);
- } else {
- gfs3_release_req req = {{0,},};
- memcpy (req.gfid, fdctx->gfid, 16);
- req.fd = fdctx->remote_fd;
- gf_msg_trace (this->name, 0, "sending release on fd");
- (void)client_submit_request (this, &req, fr, &clnt3_3_fop_prog,
- GFS3_OP_RELEASE,
- client3_3_release_cbk, NULL,
- NULL, 0, NULL, 0, NULL,
- (xdrproc_t)xdr_gfs3_release_req);
- }
-
- rpc_clnt_unref (conf->rpc);
-out:
- if (fdctx) {
- fdctx->remote_fd = -1;
- GF_FREE (fdctx);
- }
-
- return ret;
-}
-
int32_t
client3_3_releasedir (call_frame_t *frame, xlator_t *this,
void *data)