qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 11/22] blkdebug: Drop blkdebug_aiocb_info.can


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v6 11/22] blkdebug: Drop blkdebug_aiocb_info.cancel
Date: Mon, 15 Sep 2014 17:41:11 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Sep 11, 2014 at 01:41:17PM +0800, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  block/blkdebug.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/block/blkdebug.c b/block/blkdebug.c
> index 69b330e..08131b3 100644
> --- a/block/blkdebug.c
> +++ b/block/blkdebug.c
> @@ -52,11 +52,8 @@ typedef struct BlkdebugSuspendedReq {
>      QLIST_ENTRY(BlkdebugSuspendedReq) next;
>  } BlkdebugSuspendedReq;
>  
> -static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb);
> -
>  static const AIOCBInfo blkdebug_aiocb_info = {
> -    .aiocb_size = sizeof(BlkdebugAIOCB),
> -    .cancel     = blkdebug_aio_cancel,
> +    .aiocb_size    = sizeof(BlkdebugAIOCB),
>  };
>  
>  enum {
> @@ -450,16 +447,6 @@ static void error_callback_bh(void *opaque)
>      qemu_aio_release(acb);
>  }
>  
> -static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb)
> -{
> -    BlkdebugAIOCB *acb = container_of(blockacb, BlkdebugAIOCB, common);
> -    if (acb->bh) {
> -        qemu_bh_delete(acb->bh);
> -        acb->bh = NULL;
> -    }
> -    qemu_aio_release(acb);
> -}
> -

This changes cancel behavior a bit.  Instead of deleting the BH and
ending the request early we now always wait for it to complete.

It would have been nice to include rationale in the commit description
but I remember looking at the blkdebug.c code and not being sure whether
blkdebug_aio_cancel() is ever really needed anyway.  So I guess this is
fine...

Stefan

Attachment: pgpLvfjzS6p8Z.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]