summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2012-02-20 12:39:07 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-20 00:48:44 -0800
commit662958b584e7e3dff7610ec79fe4f5b9aa9a4f21 (patch)
treebb17da9f637f352b001932585ce68ef9c7a98790
parentcd3ad588f206a902027e6045e15c55380f33998d (diff)
protocol/client: writev(): don't unwind if rpc_submit failed
because rpc_submit does call 'cbk()' from inside if sending fails. no need to unwind in higher layers Change-Id: I08611ce742fba7032f68e3fe0f52a78a18a5714e Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 767359 Reviewed-on: http://review.gluster.com/2770 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index f58d6a5e2..99a8d9e8b 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -3614,8 +3614,15 @@ client3_1_writev (call_frame_t *frame, xlator_t *this, void *data)
client3_1_writev_cbk,
args->vector, args->count,
args->iobref, xdr_from_writev_req);
- if (ret)
- goto unwind;
+ if (ret) {
+ /*
+ * If the lower layers fail to submit a request, they'll also
+ * do the unwind for us (see rpc_clnt_submit), so don't unwind
+ * here in such cases.
+ */
+ gf_log (this->name, GF_LOG_WARNING,
+ "failed to send the fop: %s", strerror (op_errno));
+ }
return 0;
unwind: