vdi: basic conversion to coroutines
commit3d46a75aa5031788cb283ab4429acca23cf1cf92
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 19 Mar 2012 17:07:45 +0000 (19 18:07 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 5 Apr 2012 12:54:40 +0000 (5 14:54 +0200)
tree4c2f7687c42509dc8d022f97bb25e6acb5588321
parent1fc86bf963a0617bc9eabfa6c14dbca76cd57976
vdi: basic conversion to coroutines

Even a basic conversion changing the bdrv_aio_readv/bdrv_aio_writev calls
to bdrv_co_readv/bdrv_co_writev, and callbacks to goto statements can
eliminate a lot of code.  This is because error handling is simplified
and indirections through bottom halves can go away.

After this patch, I/O to the underlying file already happens via
coroutines, but the code still looks a lot like if asynchronous I/O was
being used.

Acked-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vdi.c