[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/59] quorum: Convert quorum_aiocb_info.cancel to .c
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 19/59] quorum: Convert quorum_aiocb_info.cancel to .cancel_async |
Date: |
Fri, 19 Sep 2014 15:41:38 +0100 |
From: Fam Zheng <address@hidden>
Before, we cancel all the child requests with bdrv_aio_cancel, then free
the acb..
Now we just kick off asynchronous cancellation of child requests and
return, we know quorum_aio_cb will be called later, so in the end
quorum_aio_finalize will take care of calling the caller's cb.
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/quorum.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/quorum.c b/block/quorum.c
index 41c4249..f343c04 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -139,17 +139,14 @@ static void quorum_aio_cancel(BlockDriverAIOCB *blockacb)
/* cancel all callbacks */
for (i = 0; i < s->num_children; i++) {
if (acb->qcrs[i].aiocb) {
- bdrv_aio_cancel(acb->qcrs[i].aiocb);
+ bdrv_aio_cancel_async(acb->qcrs[i].aiocb);
}
}
-
- g_free(acb->qcrs);
- qemu_aio_release(acb);
}
static AIOCBInfo quorum_aiocb_info = {
.aiocb_size = sizeof(QuorumAIOCB),
- .cancel = quorum_aio_cancel,
+ .cancel_async = quorum_aio_cancel,
};
static void quorum_aio_finalize(QuorumAIOCB *acb)
--
1.9.3
- [Qemu-devel] [PULL 09/59] thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async, (continued)
- [Qemu-devel] [PULL 09/59] thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 10/59] linux-aio: Convert laio_aiocb_info.cancel to .cancel_async, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 11/59] dma: Convert dma_aiocb_info.cancel to .cancel_async, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 12/59] iscsi: Convert iscsi_aiocb_info.cancel to .cancel_async, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 13/59] archipelago: Drop archipelago_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 14/59] blkdebug: Drop blkdebug_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 15/59] blkverify: Drop blkverify_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 16/59] curl: Drop curl_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 17/59] qed: Drop qed_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 18/59] quorum: fix quorum_aio_cancel(), Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 19/59] quorum: Convert quorum_aiocb_info.cancel to .cancel_async,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 20/59] rbd: Drop rbd_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 21/59] sheepdog: Convert sd_aiocb_info.cancel to .cancel_async, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 22/59] win32-aio: Drop win32_aiocb_info.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 23/59] ide: Convert trim_aiocb_info.cancel to .cancel_async, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 24/59] block: Drop AIOCBInfo.cancel, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 25/59] block: Rename qemu_aio_release -> qemu_aio_unref, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 27/59] aio-win32: avoid out-of-bounds access to the events array, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 28/59] block: Introduce "null" drivers, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 29/59] qapi: Sort BlockdevDriver enum data list, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 30/59] qapi: Sort items in BlockdevOptions definition, Stefan Hajnoczi, 2014/09/19