diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2014-05-08 16:34:43 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-04 09:56:11 +0200 |
commit | 69447cd8f361dbb6c752bd18b15322d27493ca91 (patch) | |
tree | 7ec34be1e9f1b7bf6ab87f6e047885d1e15b1ea1 /block/nbd-client.h | |
parent | 80cf6257668ec78537b02af44e059bdc46c30416 (diff) |
nbd: implement .bdrv_detach/attach_aio_context()
Drop the assumption that we're using the main AioContext. Convert
qemu_aio_set_fd_handler() calls to aio_set_fd_handler().
The .bdrv_detach/attach_aio_context() interfaces also need to be
implemented to move the socket fd handler from the old to the new
AioContext.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/nbd-client.h')
-rw-r--r-- | block/nbd-client.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/nbd-client.h b/block/nbd-client.h index f2a63378bb..cd478f3a98 100644 --- a/block/nbd-client.h +++ b/block/nbd-client.h @@ -47,4 +47,8 @@ int nbd_client_session_co_writev(NbdClientSession *client, int64_t sector_num, int nbd_client_session_co_readv(NbdClientSession *client, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); +void nbd_client_session_detach_aio_context(NbdClientSession *client); +void nbd_client_session_attach_aio_context(NbdClientSession *client, + AioContext *new_context); + #endif /* NBD_CLIENT_H */ |