[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/8] block/quorum: add quorum_aio_release() help
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH 4/8] block/quorum: add quorum_aio_release() helper |
Date: |
Mon, 1 Sep 2014 10:33:11 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
The Monday 01 Sep 2014 à 15:43:10 (+0800), Liu Yuan wrote :
> Cc: Eric Blake <address@hidden>
> Cc: Benoit Canet <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: Stefan Hajnoczi <address@hidden>
> Signed-off-by: Liu Yuan <address@hidden>
> ---
> block/quorum.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/block/quorum.c b/block/quorum.c
> index 5866bca..9e056d6 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -130,6 +130,12 @@ struct QuorumAIOCB {
>
> static bool quorum_vote(QuorumAIOCB *acb);
>
> +static void quorum_aio_release(QuorumAIOCB *acb)
> +{
> + g_free(acb->qcrs);
> + qemu_aio_release(acb);
> +}
> +
> static void quorum_aio_cancel(BlockDriverAIOCB *blockacb)
> {
> QuorumAIOCB *acb = container_of(blockacb, QuorumAIOCB, common);
> @@ -141,8 +147,7 @@ static void quorum_aio_cancel(BlockDriverAIOCB *blockacb)
> bdrv_aio_cancel(acb->qcrs[i].aiocb);
> }
>
> - g_free(acb->qcrs);
> - qemu_aio_release(acb);
> + quorum_aio_release(acb);
> }
>
> static AIOCBInfo quorum_aiocb_info = {
> @@ -168,8 +173,7 @@ static void quorum_aio_finalize(QuorumAIOCB *acb)
> }
> }
>
> - g_free(acb->qcrs);
> - qemu_aio_release(acb);
> + quorum_aio_release(acb);
> }
>
> static bool quorum_sha256_compare(QuorumVoteValue *a, QuorumVoteValue *b)
> --
> 1.9.1
>
Reviewed-by: Benoît Canet <address@hidden>
- [Qemu-devel] [PATCH 1/8] block/quorum: initialize qcrs.aiocb for read, (continued)
[Qemu-devel] [PATCH 3/8] block/sheepdog: propagate disconnect/reconnect events to upper driver, Liu Yuan, 2014/09/01
[Qemu-devel] [PATCH 4/8] block/quorum: add quorum_aio_release() helper, Liu Yuan, 2014/09/01
- Re: [Qemu-devel] [PATCH 4/8] block/quorum: add quorum_aio_release() helper,
Benoît Canet <=
[Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel(), Liu Yuan, 2014/09/01
[Qemu-devel] [PATCH 6/8] block/quorum: add broken state to BlockDriverState, Liu Yuan, 2014/09/01
[Qemu-devel] [PATCH 7/8] block: add two helpers, Liu Yuan, 2014/09/01