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: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH 1/9] block: Add bdrv_aio_cancel_async
Date: Fri, 22 Aug 2014 12:10:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

Il 22/08/2014 11:37, Fam Zheng ha scritto:
> 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.

Yes, and I don't exclude that sooner or later we'll have to add
reference counts to AIOCB anyway.  However, reference counting is not
_that_ cheap so for now I'd rather see other solutions explored.

The problem is implementing cancel_sync in terms of cancel.  The
simplest solution, for now, is to make bdrv_aio_cancel_async return
false if the callback is not implemented, and fall back to synchronous
cancellation.

Paolo



reply via email to

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