mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 19:33:39 +08:00
mirror: Store MirrorOp.co for debuggability
If a coroutine is launched, but the coroutine pointer isn't stored anywhere, debugging any problems inside the coroutine is quite hard. Let's store the coroutine pointer of a mirror operation in MirrorOp to have it available in the debugger. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
6c599282f8
commit
eed325b92c
@ -103,6 +103,7 @@ struct MirrorOp {
|
||||
bool is_pseudo_op;
|
||||
bool is_active_write;
|
||||
CoQueue waiting_requests;
|
||||
Coroutine *co;
|
||||
|
||||
QTAILQ_ENTRY(MirrorOp) next;
|
||||
};
|
||||
@ -429,6 +430,7 @@ static unsigned mirror_perform(MirrorBlockJob *s, int64_t offset,
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
op->co = co;
|
||||
|
||||
QTAILQ_INSERT_TAIL(&s->ops_in_flight, op, next);
|
||||
qemu_coroutine_enter(co);
|
||||
|
Loading…
Reference in New Issue
Block a user