summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorVijaykumar M <vmallika@redhat.com>2013-12-18 12:38:26 +0530
committerVijay Bellur <vbellur@redhat.com>2013-12-19 03:55:31 -0800
commite22c42d9154c2d9090149003038f38164701dc08 (patch)
treecd9e90569d9193f49f0466447838f8111b171823 /xlators/mgmt
parent709d9247bb467b801814637bd181bc7cddd36cb5 (diff)
glusterd: hold the lock when submitting ACC in replace-brick
replace-brick handler sets the timer to perform the replace operation and unlocks the big_lock. So we need to lock inside 'glusterd_do_replace_brick' before submitting the ACC Change-Id: I5525c62533bd92d3ac46587e5353e2443ad85851 BUG: 1044337 Signed-off-by: Vijaykumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/6534 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 94b0383fec4..5c3fc2d8259 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -2012,5 +2012,9 @@ out:
else
ret = glusterd_op_sm_inject_event (GD_OP_EVENT_COMMIT_ACC, NULL);
- glusterd_op_sm ();
+ synclock_lock (&priv->big_lock);
+ {
+ glusterd_op_sm ();
+ }
+ synclock_unlock (&priv->big_lock);
}