qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] some confusion on qemu i/o pocess and the qcow2 format


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] some confusion on qemu i/o pocess and the qcow2 format
Date: Wed, 25 Nov 2015 17:44:46 +0800
User-agent: Mutt/1.5.23 (2015-06-09)

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

[Prev in Thread] Current Thread [Next in Thread]