diff options
author | Max Reitz <mreitz@redhat.com> | 2014-06-20 21:57:32 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-29 10:48:45 +0100 |
commit | 958c717df97ea9ca47a2253b8371130fe5f22980 (patch) | |
tree | 35de5d72b69d06ac5c196e0ff8442f55d2cee78a /async.c | |
parent | a780dea0454d2820e31407c33f167acf00fe447d (diff) |
nbd: Drop nbd_can_read()
There is no variant of aio_set_fd_handler() like qemu_set_fd_handler2(),
so we cannot give a can_read() callback function. Instead, unregister
the nbd_read() function whenever we cannot read and re-register it as
soon as we can read again.
All this is hidden behind the functions nbd_set_handlers() (which
registers all handlers for the AIO context and file descriptor belonging
to the given client), nbd_unset_handlers() (which unregisters them) and
nbd_update_can_read() (which checks whether NBD can read for the given
client and acts accordingly).
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'async.c')
0 files changed, 0 insertions, 0 deletions