On Fri, Nov 20, 2015 at 11:21:14AM +0800, 浩樊啊 wrote:
> 1.what is the difference of bdrv_co_readv and bdrv_aio_readv?

bdrv_aio_readv() takes a callback function pointer and returns a request
struct.  The callback will be invoked when the request has completed.

bdrv_co_readv() must be called from coroutine context.  It performs the
request and then returns.  This is similar to traditional preadv(2)
except the coroutine will yield back to the QEMU event loop instead of
blocking the thread.

Please take a look at include/qemu/coroutine.h if you'd like to learn
more about coroutines.

I have also written about coroutines here:
http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html

> 2.I am confused about the I/O pocess of qcow2, i find. Can anybody tell me 
> the detail pocess? or arethere any useful tools to trace the pocess?

Unless you have more specific questions, the only advice I can give is
to read the source code and/or add printfs to help you understand the
code execution.

Attachment: signature.asc
Description: PGP signature

Reply via email to