qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 1/9] block: Add bdrv_aio_cancel_async


From: Fam Zheng
Subject: Re: [Qemu-devel] [RFC PATCH 1/9] block: Add bdrv_aio_cancel_async
Date: Fri, 22 Aug 2014 17:37:58 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, 08/22 10:14, Paolo Bonzini wrote:
> Il 22/08/2014 03:23, Fam Zheng ha scritto:
> > What about we save cb and opaque locally, and set acb->cb to a nop. When 
> > cancel
> > is done we can call the original cb?
> 
> That might work but needs some auditing.  Right now the AIOCB is still
> valid when the callback is called, and this would be changed.
> 
> Also, having different semantics for cancellation vs. completion would
> be painful.
> 

Exactly. I'd rather not change the contract then.

Alternatively, we may add a refcnt field to BlockDriverAioCB and grab one before
calling .cancel, so the qemu_aio_release will not free it.

Fam



reply via email to

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