qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 11/20] blkdebug: Convert blkdebug_aiocb_info.


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 11/20] blkdebug: Convert blkdebug_aiocb_info.cancel to .cancel_async
Date: Wed, 03 Sep 2014 13:42:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Il 03/09/2014 13:23, Fam Zheng ha scritto:
>  static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb)
>  {
>      BlkdebugAIOCB *acb = container_of(blockacb, BlkdebugAIOCB, common);
> +    acb->ret = -ECANCELED;
> +    acb->common.cb(acb->common.opaque, acb->ret);
>      if (acb->bh) {
>          qemu_bh_delete(acb->bh);
>          acb->bh = NULL;

I think you shouldn't invoke the callback here, and instead you can just
let the bottom half do the work.

Actually, a no-op implementation of blkdebug_aio_cancel would work.

Paolo



reply via email to

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