qemu-nbd: add client pointer to NBDRequest
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Oct 2011 14:47:56 +0000 (16:47 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Dec 2011 10:53:59 +0000 (11:53 +0100)
commit72deddc5e61e974fbf561dc704742f102b91de82
treee03c6eeb57076a8cd0052e62419e67e9969492ea
parent1743b515860ef645b285908ee367c5e343e0020c
qemu-nbd: add client pointer to NBDRequest

By attaching a client to an NBDRequest, we can avoid passing around the
socket descriptor and data buffer.

Also, we can now manage the reference count for the client in
nbd_request_get/put request instead of having to do it ourselved in
nbd_read.  This simplifies things when coroutines are used.

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