qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_p


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_poll()
Date: Thu, 7 Feb 2013 09:24:05 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Feb 06, 2013 at 07:24:42PM +0100, Laszlo Ersek wrote:
> On 02/04/13 13:12, Stefan Hajnoczi wrote:
> > We will need to loop over AioHandlers calling ->io_read()/->io_write()
> > when aio_poll() is converted from select(2) to g_poll(2).
> > 
> > Luckily the code for this already exists, extract it into the new
> > aio_dispatch() function.
> > 
> > Two small changes:
> > 
> >  * aio_poll() checks !node->deleted to avoid calling handlers that have
> >    been deleted.
> 
> This is actually an unrelated bugfix, isn't it?

It is related because there are two copies of the aio handler dispatch
code - one for glib and one for select.  The !node->deleted check is
present in the select version of the loop but not in the glib version.

In the next patch I get rid of select version and reuse the function
extracted from the glib version by this patch.  I wouldn't be confident
in reusing the extracted function without !node->deleted.

Stefan



reply via email to

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