qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block/quorum.c: Decrease child index when del_child
@ 2020-06-01  7:19 Zhang Chen
  2020-06-01 10:38 ` Alberto Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang Chen @ 2020-06-01  7:19 UTC (permalink / raw)
  To: Alberto Garcia, Kevin Wolf, Max Reitz, qemu-dev
  Cc: Jason Wang, Zhang Chen, Zhanghailiang, Dr . David Alan Gilbert,
	Zhang Chen

From: Zhang Chen <chen.zhang@intel.com>

Fix this bug:
colo: Can not recover colo after svm failover twice
https://bugs.launchpad.net/bugs/1881231

The child index still be hold when it be deleted, the max num is 32.

Reported-by: Ye.Zou <ye.zou@zstack.io>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
---
 block/quorum.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/quorum.c b/block/quorum.c
index 7cf7ab1546..f71bd4e19d 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -1099,6 +1099,7 @@ static void quorum_del_child(BlockDriverState *bs, BdrvChild *child,
             (s->num_children - i - 1) * sizeof(BdrvChild *));
     s->children = g_renew(BdrvChild *, s->children, --s->num_children);
     bdrv_unref_child(bs, child);
+    s->next_child_index--;
 
     bdrv_drained_end(bs);
 }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-02  1:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-01  7:19 [PATCH] block/quorum.c: Decrease child index when del_child Zhang Chen
2020-06-01 10:38 ` Alberto Garcia
2020-06-01 18:12   ` Lukas Straub
2020-06-01 21:41     ` Alberto Garcia
2020-06-02  0:59     ` Zhang, Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).