blob: ee5e9373fff9f1a667ced28239a60738e81a724b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
qemu crash for suspend and resume vm while backup disk of vm
Description of problem:

Steps to reproduce:
1. virsh create vm2.xml
2. virsh backup-begin domid
3. virsh suspend domid
4. sleep 1 && virsh resume domid
qemu crash
Additional information:
static int blk_do_set_aio_context(BlockBackend *blk, AioContext *new_context,
bool update_root_node, Error **errp)
{
BlockDriverState *bs = blk_bs(blk);
ThrottleGroupMember *tgm = &blk->public.throttle_group_member;
int ret;
if (bs) {
bdrv_ref(bs);
if (update_root_node) {
ret = bdrv_child_try_set_aio_context(bs, new_context, blk->root,
errp);
if (ret < 0) {
bdrv_unref(bs);
return ret;
}
}
if (tgm->throttle_state) {
_ ****bdrv_drained_begin(bs);----- bs->aio_context->lock lock count is 0,so unlock failed**_
throttle_group_detach_aio_context(tgm);
throttle_group_attach_aio_context(tgm, new_context);
bdrv_drained_end(bs);
}
bdrv_unref(bs);
}
blk->ctx = new_context;
return 0;
}
|