[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.canc
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.cancel to .cancel_async |
Date: |
Thu, 4 Sep 2014 17:40:59 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
The Wednesday 03 Sep 2014 à 19:23:50 (+0800), Fam Zheng wrote :
> 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>
> ---
> block/quorum.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/block/quorum.c b/block/quorum.c
> index 093382e..0951d52 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -138,16 +138,13 @@ static void quorum_aio_cancel(BlockDriverAIOCB
> *blockacb)
>
> /* cancel all callbacks */
> for (i = 0; i < s->num_children; i++) {
> - 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)
> --
> 2.1.0.27.g96db324
>
Look good but this seems to conflict with one of Liu ongoing patches
as the the quorum_cancel method is currently broken and Liu repair it
in his latest patchset.
See: http://lists.gnu.org/archive/html/qemu-devel/2014-09/msg00022.html
I think one of your series must rebase on the other.
Liu: can you coordinate with Fam ?
- Re: [Qemu-devel] [PATCH v4 07/20] dma: Check iov pointer before unmap memory, (continued)
- [Qemu-devel] [PATCH v4 08/20] dma: Convert dma_aiocb_info.cancel to .cancel_async, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 09/20] iscsi: Convert iscsi_aiocb_info.cancel to .cancel_async, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 10/20] archipelago: Drop archipelago_aiocb_info.cancel, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 11/20] blkdebug: Convert blkdebug_aiocb_info.cancel to .cancel_async, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 12/20] blkverify: Drop blkverify_aiocb_info.cancel, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 13/20] curl: Drop curl_aiocb_info.cancel, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 14/20] qed: Drop qed_aiocb_info.cancel, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.cancel to .cancel_async, Fam Zheng, 2014/09/03
- Re: [Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.cancel to .cancel_async,
Benoît Canet <=
- [Qemu-devel] [PATCH v4 16/20] rbd: Drop rbd_aiocb_info.cancel, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 17/20] sheepdog: Convert sd_aiocb_info.cancel to .cancel_async, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 18/20] win32-aio: Drop win32_aiocb_info.cancel, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 19/20] ide: Convert trim_aiocb_info.cancel to .cancel_async, Fam Zheng, 2014/09/03
- [Qemu-devel] [PATCH v4 20/20] block: Drop AIOCBInfo.cancel, Fam Zheng, 2014/09/03