[Top][All Lists]

[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: Alberto Garcia
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block: Let bdrv_drain_all() to call aio_poll() for each AioContext
Date: Wed, 13 May 2015 18:02:31 +0200
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

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


reply via email to

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