On Mon, Aug 26, 2013 at 09:59:51PM -0500, Yaodong Yang wrote:
> In sum, the bdrv_co_do_readv() seems to be executed inside two thread, the 
> migration thread and native iothread. Both of them executed the function 
> twice for a single request. Could someone explain it for me ? I appreciate it 
> very much!

Did you check the bdrv_co_readv(bs=...) argument?  The calls may be
referring to two different BlockDriverState instances.

A raw image file looks like this:

 BDS#1 (block/raw.c)
   ->backing_hd = NULL
   ->file = BDS#2

 BDS#2 (block/raw-posix.c)

With qcow2 and no backing file you would have something like this:

 BDS#1 (block/qcow2.c)
   ->backing_hd = NULL
   ->file = BDS#2

 BDS#2 (block/raw-posix.c)

Expect to see calls forwarded from BDS#1 to BDS#2.

Stefan

Reply via email to