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