Il 06/09/2012 11:06, Kevin Wolf ha scritto:
>> > If it works, I think this change would be preferrable to using a "magic"
>> > BH in every driver.
> The way it works in posix-aio-compat is that the request is first
> removed from the list and then the callback is called. This way
> posix_aio_flush() can return 0 and bdrv_drain_all() completes.

So the same could be done in gluster: first decrease qemu_aio_count,
then call the callback, then call qemu_aio_release.

But in either case, wouldn't that leak the AIOCBs until the end of
qcow2_create?

The AIOCB is already invalid at the time the callback is entered, so we
could release it before the call.  However, not all implementation of
AIO are ready for that and I'm not really in the mood for large scale
refactoring...

Paolo

Reply via email to