|
|
14f8ab |
From e06882a7fea9720a2899f7d52d5d3866ff098866 Mon Sep 17 00:00:00 2001
|
|
|
14f8ab |
From: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
14f8ab |
Date: Thu, 21 May 2020 08:26:11 +0200
|
|
|
14f8ab |
Subject: [PATCH 379/379] glusterd: add missing synccond_broadcast()
|
|
|
14f8ab |
|
|
|
14f8ab |
After the changes in commit 3da22f8cb08b05562a4c6bd2694f2f19199cff7f,
|
|
|
14f8ab |
there was a place where synccond_broadcast() was missing. It could
|
|
|
14f8ab |
cause a hang if another synctask was waiting on the condition variable.
|
|
|
14f8ab |
|
|
|
14f8ab |
Upstream patch:
|
|
|
14f8ab |
> Upstream patch link: https://review.gluster.org/c/glusterfs/+/24476
|
|
|
14f8ab |
> Change-Id: I92bfe4e15c5c3591e4854a64aa9e1566d50dd204
|
|
|
14f8ab |
> Fixes: #1116
|
|
|
14f8ab |
> Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
14f8ab |
|
|
|
14f8ab |
Change-Id: I92bfe4e15c5c3591e4854a64aa9e1566d50dd204
|
|
|
14f8ab |
BUG: 1810516
|
|
|
14f8ab |
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
14f8ab |
Reviewed-on: https://code.engineering.redhat.com/gerrit/201057
|
|
|
14f8ab |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
14f8ab |
---
|
|
|
14f8ab |
xlators/mgmt/glusterd/src/glusterd-utils.c | 4 +++-
|
|
|
14f8ab |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
14f8ab |
|
|
|
14f8ab |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
14f8ab |
index ce9931c..c92cdf3 100644
|
|
|
14f8ab |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
14f8ab |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
14f8ab |
@@ -6797,9 +6797,11 @@ glusterd_restart_bricks(void *opaque)
|
|
|
14f8ab |
ret = 0;
|
|
|
14f8ab |
|
|
|
14f8ab |
out:
|
|
|
14f8ab |
- GF_ATOMIC_DEC(conf->blockers);
|
|
|
14f8ab |
conf->restart_done = _gf_true;
|
|
|
14f8ab |
conf->restart_bricks = _gf_false;
|
|
|
14f8ab |
+ if (GF_ATOMIC_DEC(conf->blockers) == 0) {
|
|
|
14f8ab |
+ synccond_broadcast(&conf->cond_blockers);
|
|
|
14f8ab |
+ }
|
|
|
14f8ab |
synccond_broadcast(&conf->cond_restart_bricks);
|
|
|
14f8ab |
|
|
|
14f8ab |
return_block:
|
|
|
14f8ab |
--
|
|
|
14f8ab |
1.8.3.1
|
|
|
14f8ab |
|