qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] block: Let bdrv_drain_all() to call aio_poll()


From: Alexander Yarygin
Subject: Re: [Qemu-block] [PATCH] block: Let bdrv_drain_all() to call aio_poll() for each AioContext
Date: Wed, 13 May 2015 19:37:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Alberto Garcia <address@hidden> writes:

> On Wed 13 May 2015 05:18:31 PM CEST, Alexander Yarygin <address@hidden> wrote:
>
>> +            if (!aio_ctxs || !g_list_find(aio_ctxs, aio_context)) {
>> +                busy |= aio_poll(aio_context, busy);
>> +                aio_ctxs = g_list_append(aio_ctxs, aio_context);
>> +            }
>
> g_list_append() walks the whole list in order to append an element, I
> think you should use _prepend() instead.
>
> And since that's the only operation you're doing you can use a GSList
> instead.
>
> Berto

This seems reasonable, thanks.




reply via email to

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