From: Zhang Chen <chen.zhang@intel.com >
To: Alberto Garcia <berto@igalia.com>, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>, qemu-dev <qemu-devel@nongnu.org>
Cc: Jason Wang <jasowang@redhat.com>,
Zhang Chen <chen.zhang@intel.com>,
Zhanghailiang <zhang.zhanghailiang@huawei.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Zhang Chen <zhangckid@gmail.com>
Subject: [PATCH] block/quorum.c: Decrease child index when del_child
Date: Mon, 1 Jun 2020 15:19:56 +0800 [thread overview]
Message-ID: <20200601071956.18006-1-chen.zhang@intel.com> (raw)
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
next reply other threads:[~2020-06-01 7:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 7:19 Zhang Chen [this message]
2020-06-01 10:38 ` [PATCH] block/quorum.c: Decrease child index when del_child Alberto Garcia
2020-06-01 18:12 ` Lukas Straub
2020-06-01 21:41 ` Alberto Garcia
2020-06-02 0:59 ` Zhang, Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200601071956.18006-1-chen.zhang@intel.com \
--to=chen.zhang@intel.com \
--cc=berto@igalia.com \
--cc=dgilbert@redhat.com \
--cc=jasowang@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhanghailiang@huawei.com \
--cc=zhangckid@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.