[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH] block: Let bdrv_drain_all() to cal
From: |
Alexander Yarygin |
Subject: |
Re: [Qemu-devel] [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.