[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel()
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel() |
Date: |
Mon, 1 Sep 2014 10:35:27 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
The Monday 01 Sep 2014 à 15:43:11 (+0800), Liu Yuan wrote :
> For a fifo read pattern, we only have one running aio
>(possible other cases that has less number than num_children in the future)
I have trouble understanding this part of the commit message could you try
to clarify it ?
> , so we need to check if
> .acb is NULL against bdrv_aio_cancel() to avoid segfault.
>
> 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 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/block/quorum.c b/block/quorum.c
> index 9e056d6..b9eeda3 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -144,7 +144,9 @@ 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);
> + if (acb->qcrs[i].aiocb) {
> + bdrv_aio_cancel(acb->qcrs[i].aiocb);
> + }
> }
>
> quorum_aio_release(acb);
> --
> 1.9.1
>
- Re: [Qemu-devel] [PATCH 2/8] block: add driver operation callbacks, (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
[Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel(), Liu Yuan, 2014/09/01
- Re: [Qemu-devel] [PATCH 5/8] quorum: fix quorum_aio_cancel(),
Benoît Canet <=
[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
[Qemu-devel] [PATCH 8/8] quorum: add basic device recovery logic, Liu Yuan, 2014/09/01