summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorzhangxianwei8 <33945019+zhangxianwei8@users.noreply.github.com>2021-03-04 18:25:00 +0800
committerGitHub <noreply@github.com>2021-03-04 15:55:00 +0530
commit082014c1de47ebe9bc2c021b66e36b2141f3cbbe (patch)
tree590ca1d83a7107627ebd3d93629f33568606cb75 /xlators
parent72a9fc8ca1acad32803755aad4593bf499cc2354 (diff)
downloadglusterfs-082014c1de47ebe9bc2c021b66e36b2141f3cbbe.tar.gz
glusterfs-082014c1de47ebe9bc2c021b66e36b2141f3cbbe.tar.xz
glusterfs-082014c1de47ebe9bc2c021b66e36b2141f3cbbe.zip
glusterd: Fix deadlock while concurrent quota enable (#2118)
in glusterd_svc_start: 1) synctaskA gets attach_lock and then releases big_lock to execute runner_run. 2) synctaskB then gets big_lock but can not gets attach_lock and then wait. 3) After executes runner_run, synctaskA then gets big_lock but synctaskB holds it, wait. This leads to deadlock. This patch uses runner_run_nowait to avoid the deadlock. fixes: #2117 Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index 9164ef0142..a0ea658980 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -1583,7 +1583,7 @@ glusterd_quotad_op(int opcode)
ret = glusterd_svc_stop(&(priv->quotad_svc), SIGTERM);
else
ret = priv->quotad_svc.manager(&(priv->quotad_svc), NULL,
- PROC_START);
+ PROC_START_NO_WAIT);
break;
default: