sheepdog: reorganize coroutine flow
commite80ab33dc0f9b87542b7aa1088d2e1e3968ed516
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Nov 2016 11:32:42 +0000 (29 12:32 +0100)
committerJeff Cody <jcody@redhat.com>
Wed, 1 Feb 2017 05:17:20 +0000 (1 00:17 -0500)
tree08ced04e20c897bc53c0f3a432033ced2e268e0e
parenta71264f9f5068213f5757133bba028ae1f37d460
sheepdog: reorganize coroutine flow

Delimit co_recv's lifetime clearly in aio_read_response.

Do a simple qemu_coroutine_enter in aio_read_response, letting
sd_co_writev call sd_write_done.

Handle nr_pending in the same way in sd_co_rw_vector,
sd_write_done and sd_co_flush_to_disk.

Remove sd_co_rw_vector's return value; just leave with no
pending requests.

[Jeff: added missing 'return' back, spotted by Paolo after
       series was applied.]

Signed-off-by: Jeff Cody <jcody@redhat.com>
block/sheepdog.c