qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PULL 27/37] block: extract AIO_WAIT_WHILE


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PULL 27/37] block: extract AIO_WAIT_WHILE() from BlockDriverState
Date: Mon, 5 Mar 2018 13:53:04 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/02/2018 12:54 PM, Kevin Wolf wrote:
From: Stefan Hajnoczi <address@hidden>

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.

BlockBackend needs this behavior but doesn't always have a


Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---

+++ b/include/block/block.h
@@ -2,6 +2,7 @@
  #define BLOCK_H
#include "block/aio.h"
+#include "block/aio-wait.h"
  #include "qapi-types.h"

Will need a minor rebase now that commit 9af23989 has renamed qapi-types.h.

--
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]