qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/4] block: extract AIO_WAIT_WHILE() from Blo


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 1/4] block: extract AIO_WAIT_WHILE() from BlockDriverState
Date: Wed, 14 Feb 2018 16:33:23 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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 <address@hidden>

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

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