diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-01-28 16:06:41 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-02-18 10:53:56 +0100 |
commit | eed325b92c3e68417121ea23f96e33af6a4654ed (patch) | |
tree | 54e713957377b39fea21b2805c28e8e93ea7ebda /block | |
parent | 6c599282f8ab382fe59f03a6cae755b89561a7b3 (diff) | |
download | qemu-eed325b92c3e68417121ea23f96e33af6a4654ed.zip qemu-eed325b92c3e68417121ea23f96e33af6a4654ed.tar.gz qemu-eed325b92c3e68417121ea23f96e33af6a4654ed.tar.bz2 |
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/mirror.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/mirror.c b/block/mirror.c index f0f2d9d..8959e42 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -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); |