summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-08 10:59:43 +0530
committerAnand Avati <avati@redhat.com>2012-03-18 01:52:04 -0700
commit4d4a1e0801d1a7b2b3ec226309809c5fddd84319 (patch)
treeb2b7372f4a99e7cf42bc6c343cdd42b6d8c96cb7 /xlators/protocol/client/src/client-handshake.c
parent968c6ba70cbcc058823947cc925072e03cbb0ac8 (diff)
rpc: don't unwind the fop in caller if client_submit_request fails
client_submit_request guarantees that the cbkfn - which we pass to it as argument - is called whenever there is a failure. Change-Id: I0e8ce5a6b320246dc13ce4318b04739d38d183a3 BUG: 767359 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2896 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r--xlators/protocol/client/src/client-handshake.c55
1 files changed, 17 insertions, 38 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 6d6e8ebc77b..a629e05cb0c 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -227,14 +227,14 @@ client_start_ping (void *data)
ret = client_submit_request (this, NULL, frame, conf->handshake,
GF_HNDSK_PING, client_ping_cbk, NULL,
NULL, 0, NULL, 0, NULL, (xdrproc_t)NULL);
- if (ret)
- goto fail;
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "failed to start ping timer");
+ }
return;
-fail:
- gf_log (THIS->name, GF_LOG_ERROR,
- "failed to start ping timer");
+fail:
if (frame) {
STACK_DESTROY (frame->root);
}
@@ -376,12 +376,13 @@ int32_t client3_getspec (call_frame_t *frame, xlator_t *this, void *data)
NULL, NULL, 0, NULL, 0, NULL,
(xdrproc_t)xdr_gf_getspec_req);
- if (ret)
- goto unwind;
+ if (ret) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "failed to send the request");
+ }
return 0;
unwind:
- gf_log (this->name, GF_LOG_WARNING, "failed to send the request");
STACK_UNWIND_STRICT (getspec, frame, -1, op_errno, NULL);
return 0;
@@ -602,15 +603,6 @@ clnt_release_reopen_fd (xlator_t *this, clnt_fd_ctx_t *fdctx)
NULL, 0, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_releasedir_req);
out:
- if (ret) {
- decrement_reopen_fd_count (this, conf);
- clnt_mark_fd_bad (conf, fdctx);
- if (frame) {
- frame->local = NULL;
- STACK_DESTROY (frame->root);
- }
- }
-
return 0;
}
@@ -750,17 +742,6 @@ _client_reacquire_lock (xlator_t *this, clnt_fd_ctx_t *fdctx)
frame = NULL;
}
- if (ret) {
- clnt_fd_lk_local_mark_error (this, local);
-
- if (frame) {
- if (frame->local) {
- clnt_fd_lk_local_unref (this, frame->local);
- frame->local = NULL;
- }
- STACK_DESTROY (frame->root);
- }
- }
if (local)
(void) clnt_fd_lk_local_unref (this, local);
out:
@@ -1034,15 +1015,14 @@ protocol_client_reopendir (xlator_t *this, clnt_fd_ctx_t *fdctx)
client3_1_reopendir_cbk, NULL,
NULL, 0, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_opendir_req);
- if (ret)
- goto out;
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "failed to send the re-opendir request");
+ }
return ret;
out:
- gf_log (THIS->name, GF_LOG_ERROR,
- "failed to send the re-opendir request");
-
if (frame) {
frame->local = NULL;
STACK_DESTROY (frame->root);
@@ -1115,15 +1095,14 @@ protocol_client_reopen (xlator_t *this, clnt_fd_ctx_t *fdctx)
GFS3_OP_OPEN, client3_1_reopen_cbk, NULL,
NULL, 0, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_open_req);
- if (ret)
- goto out;
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "failed to send the re-open request");
+ }
return ret;
out:
- gf_log (THIS->name, GF_LOG_ERROR,
- "failed to send the re-open request");
-
if (frame) {
frame->local = NULL;
STACK_DESTROY (frame->root);