mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
trace: Trace posix-aio-compat.c completion and cancellation
This patch adds paio_complete() and paio_cancel() trace events to complement the paio_submit() event. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
a13aac04e1
commit
ddca9fb2b5
2 changed files with 7 additions and 0 deletions
|
@ -455,6 +455,9 @@ static int posix_aio_process_queue(void *opaque)
|
|||
} else {
|
||||
ret = -ret;
|
||||
}
|
||||
|
||||
trace_paio_complete(acb, acb->common.opaque, ret);
|
||||
|
||||
/* remove the request */
|
||||
*pacb = acb->next;
|
||||
/* call the callback */
|
||||
|
@ -537,6 +540,8 @@ static void paio_cancel(BlockDriverAIOCB *blockacb)
|
|||
struct qemu_paiocb *acb = (struct qemu_paiocb *)blockacb;
|
||||
int active = 0;
|
||||
|
||||
trace_paio_cancel(acb, acb->common.opaque);
|
||||
|
||||
mutex_lock(&lock);
|
||||
if (!acb->active) {
|
||||
QTAILQ_REMOVE(&request_list, acb, node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue