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