]> git.proxmox.com Git - qemu.git/commit - nbd.c
qemu-nbd: introduce nbd_do_send_reply
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 19 Sep 2011 12:25:30 +0000 (14:25 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Dec 2011 10:53:58 +0000 (11:53 +0100)
commit220455920384af77670e84953f3763153e39bcfa
tree014c5d59371f102277da6724b70aa143c5e22803
parenta478f6e595dab1801931d56d097623d65f5b6d1d
qemu-nbd: introduce nbd_do_send_reply

Group the sending of a reply and the associated data into a new function.
Without corking, the caller would be forced to leave 12 free bytes at the
beginning of the data pointer.  Not too ugly, but still ugly. :)

Using nbd_do_send_reply everywhere will help when the routine will set up
the write handler that re-enters the send coroutine.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd.c