On Thu, Jun 13, 2013 at 10:33:58AM -0400, Paolo Bonzini wrote:
> Il 10/06/2013 10:38, Stefan Hajnoczi ha scritto:
> > On Mon, Jun 10, 2013 at 02:25:57PM +0200, Stefan Hajnoczi wrote:
> >> @@ -1427,26 +1456,18 @@ void bdrv_close_all(void)
> >> void bdrv_drain_all(void)
> >> {
> >> BlockDriver
Il 10/06/2013 10:38, Stefan Hajnoczi ha scritto:
> On Mon, Jun 10, 2013 at 02:25:57PM +0200, Stefan Hajnoczi wrote:
>> @@ -1427,26 +1456,18 @@ void bdrv_close_all(void)
>> void bdrv_drain_all(void)
>> {
>> BlockDriverState *bs;
>> -bool busy;
>> -
>> -do {
>> -busy = qemu_aio
On Mon, Jun 10, 2013 at 02:25:57PM +0200, Stefan Hajnoczi wrote:
> @@ -1427,26 +1456,18 @@ void bdrv_close_all(void)
> void bdrv_drain_all(void)
> {
> BlockDriverState *bs;
> -bool busy;
> -
> -do {
> -busy = qemu_aio_wait();
>
> +while (bdrv_requests_pending_all()) {
>
If a block driver has no file descriptors to monitor but there are still
active requests, it can return 1 from .io_flush(). This is used to spin
during synchronous I/O.
Stop relying on .io_flush() and instead check
QLIST_EMPTY(&bs->tracked_requests) to decide whether there are active
requests.
T