Re: [Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback

2014-06-05 Thread Max Reitz
On 03.06.2014 19:55, Paolo Bonzini wrote: Il 31/05/2014 20:43, Max Reitz ha scritto: @@ -108,7 +120,9 @@ bool aio_pending(AioContext *ctx) int revents; revents = node->pfd.revents & node->pfd.events; -if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read) { +

Re: [Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback

2014-06-04 Thread Stefan Hajnoczi
On Sat, May 31, 2014 at 08:43:09PM +0200, Max Reitz wrote: > Similar to how qemu_set_fd_handler2() allows defining a function which > checks whether the recipient is ready to read, add aio_set_fd_handler2() > with a parameter for defining such a callback. > > Signed-off-by: Max Reitz > --- > aio

Re: [Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback

2014-06-03 Thread Paolo Bonzini
Il 31/05/2014 20:43, Max Reitz ha scritto: @@ -108,7 +120,9 @@ bool aio_pending(AioContext *ctx) int revents; revents = node->pfd.revents & node->pfd.events; -if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read) { +if (revents & (G_IO_IN | G_IO_HUP |

[Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback

2014-05-31 Thread Max Reitz
Similar to how qemu_set_fd_handler2() allows defining a function which checks whether the recipient is ready to read, add aio_set_fd_handler2() with a parameter for defining such a callback. Signed-off-by: Max Reitz --- aio-posix.c | 26 -- include/block/aio.