On 02/13/2018 10:01 AM, Eric Blake wrote:
On 02/13/2018 08:20 AM, Stefan Hajnoczi wrote:
BlockDriverState has the BDRV_POLL_WHILE() macro to wait on event loop
activity while a condition evaluates to true.  This is used to implement
synchronous operations where it acts as a condvar between the IOThread
running the operation and the main loop waiting for the operation.  It
can also be called from the thread that owns the AioContext and in that
case it's just a nested event loop.

It may be that your patch is correct (as I'm not an expert on the rules in play here), but more comments may help.  Or you may have a NULL dereference bug lurking.  So at this point, I can't give R-b, even though the refactoring of the BDRV_POLL_WHILE() macro into a separate helper makes sense from the high level view.

Okay, based on your responses, I can now give

Reviewed-by: Eric Blake <ebl...@redhat.com>

although it may still help to do followups with better documentation and/or a rename of the confusing functions.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to