aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-01-14 16:41:03 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-01-15 18:58:02 +0100
commit1a6245a5b0b4e8d822c739b403fc67c8a7bc8d12 (patch)
treebf224381188470d2953a710e02272a442340acf4 /linux-user
parent798bfe00063ceaa90aa2bf6e4e5c569c80fb4e92 (diff)
nbd-server: Coroutine based negotiation
Create a coroutine in nbd_client_new, so that nbd_send_negotiate doesn't need qemu_set_block(). Handlers need to be set temporarily for csock fd in case the coroutine yields during I/O. With this, if the other end disappears in the middle of the negotiation, we don't block the whole event loop. To make the code clearer, unify all function names that belong to negotiate, so they are less likely to be misused. This is important because we rely on negotiation staying in main loop, as commented in nbd_negotiate_read/write(). Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1452760863-25350-4-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-user')
0 files changed, 0 insertions, 0 deletions