]> xenbits.xensource.com Git - qemu-xen.git/commit
nbd/server: get rid of nbd_negotiate_read and friends
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 2 Jun 2017 15:01:41 +0000 (18:01 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:04:06 +0000 (11:04 +0200)
commit2b0bbc4f8809c972bad134bc1a2570dbb01dea0b
tree10e8eed5061413e0b7aa5e832fce2d9a103db4bf
parent44298024d30ad36439707b89715a76333f58791b
nbd/server: get rid of nbd_negotiate_read and friends

Functions nbd_negotiate_{read,write,drop_sync} were introduced in
1a6245a5b, when nbd_rwv (was nbd_wr_sync) was working through
qemu_co_sendv_recvv (the path is nbd_wr_sync -> qemu_co_{recv/send} ->
qemu_co_send_recv -> qemu_co_sendv_recvv), which just yields, without
setting any handlers. But starting from ff82911cd nbd_rwv (was
nbd_wr_syncv) works through qio_channel_yield() which sets handlers, so
watchers are redundant in nbd_negotiate_{read,write,drop_sync}, then,
let's just use nbd_{read,write,drop} functions.

Functions nbd_{read,write,drop} has errp parameter, which is unused in
this patch. This will be fixed later.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170602150150.258222-4-vsementsov@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd/server.c