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