summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-05-05 10:58:10 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-05-28 19:38:05 -0700
commit4397d7e72fdff6f01c59b72eebea421f23c1a392 (patch)
tree8c09329c2fbccaf5cb8a4c80ed8323a670ef0aa1 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parente6934debda3a67b5666f1aa30b33c5267de49d84 (diff)
glusterd/snapshot: Return correct errno in events of failure - PATCH 1
RETCODE ERROR ------------------------------------------- 30800 Internal Error 30801 Another Transaction In Progress Change-Id: Ica7fd2e513b2c28717b6df73cfb2667725dbf057 BUG: 1212413 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/10313 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 49ba9aac559..4687aa81846 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -3210,6 +3210,7 @@ glusterd_op_ac_lock (glusterd_op_sm_event_t *event, void *ctx)
glusterd_op_lock_ctx_t *lock_ctx = NULL;
glusterd_conf_t *priv = NULL;
xlator_t *this = NULL;
+ uint32_t op_errno = 0;
GF_ASSERT (event);
GF_ASSERT (ctx);
@@ -3232,7 +3233,7 @@ glusterd_op_ac_lock (glusterd_op_sm_event_t *event, void *ctx)
"Unable to acquire volname");
else {
ret = glusterd_mgmt_v3_lock (volname, lock_ctx->uuid,
- "vol");
+ &op_errno, "vol");
if (ret)
gf_log (this->name, GF_LOG_ERROR,
"Unable to acquire lock for %s",
@@ -3242,7 +3243,7 @@ glusterd_op_ac_lock (glusterd_op_sm_event_t *event, void *ctx)
ret = dict_get_str (lock_ctx->dict, "globalname", &globalname);
if (!ret) {
ret = glusterd_mgmt_v3_lock (globalname, lock_ctx->uuid,
- "global");
+ &op_errno, "global");
if (ret)
gf_log (this->name, GF_LOG_ERROR,
"Unable to acquire lock for %s",