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