diff options
author | Max Reitz | 2014-06-20 21:57:32 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-08-29 11:48:45 +0200 |
commit | 958c717df97ea9ca47a2253b8371130fe5f22980 (patch) | |
tree | 35de5d72b69d06ac5c196e0ff8442f55d2cee78a /include | |
parent | sheepdog: fix a core dump while do auto-reconnecting (diff) | |
download | qemu-958c717df97ea9ca47a2253b8371130fe5f22980.tar.gz qemu-958c717df97ea9ca47a2253b8371130fe5f22980.tar.xz qemu-958c717df97ea9ca47a2253b8371130fe5f22980.zip |
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 'include')
0 files changed, 0 insertions, 0 deletions