[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/36] mirror: Store MirrorOp.co for debuggability
From: |
Kevin Wolf |
Subject: |
[PULL 01/36] mirror: Store MirrorOp.co for debuggability |
Date: |
Tue, 18 Feb 2020 15:06:47 +0100 |
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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block/mirror.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/mirror.c b/block/mirror.c
index f0f2d9dff1..8959e4255f 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);
--
2.20.1
- [PULL 00/36] Block layer patches, Kevin Wolf, 2020/02/18
- [PULL 04/36] block/vvfat: Do not unref qcow on closing backing bdrv, Kevin Wolf, 2020/02/18
- [PULL 02/36] mirror: Don't let an operation wait for itself, Kevin Wolf, 2020/02/18
- [PULL 05/36] qcow2: update_refcount(): Reset old_table_index after qcow2_cache_put(), Kevin Wolf, 2020/02/18
- [PULL 06/36] qcow2: Fix qcow2_alloc_cluster_abort() for external data file, Kevin Wolf, 2020/02/18
- [PULL 03/36] qcow2: Fix alignment checks in encrypted images, Kevin Wolf, 2020/02/18
- [PULL 01/36] mirror: Store MirrorOp.co for debuggability,
Kevin Wolf <=
- [PULL 08/36] block/qcow2-bitmap: Remove unneeded variable assignment, Kevin Wolf, 2020/02/18
- [PULL 07/36] iotests: Test copy offloading with external data file, Kevin Wolf, 2020/02/18
- [PULL 09/36] qapi: Document meaning of 'ignore' BlockdevOnError for jobs, Kevin Wolf, 2020/02/18
- [PULL 12/36] commit: Inline commit_populate(), Kevin Wolf, 2020/02/18
- [PULL 11/36] commit: Fix argument order for block_job_error_action(), Kevin Wolf, 2020/02/18
- [PULL 14/36] commit: Expose on-error option in QMP, Kevin Wolf, 2020/02/18
- [PULL 10/36] commit: Remove unused bytes_written, Kevin Wolf, 2020/02/18
- [PULL 16/36] block: Remove superfluous semicolons, Kevin Wolf, 2020/02/18
- [PULL 17/36] block/io_uring: Remove superfluous semicolon, Kevin Wolf, 2020/02/18
- [PULL 13/36] commit: Fix is_read for block_job_error_action(), Kevin Wolf, 2020/02/18