Re: [Qemu-devel] questions about the bdrv_co_do_readv()

2013-08-28 Thread Stefan Hajnoczi
On Tue, Aug 27, 2013 at 05:55:26PM -0500, Yaodong Yang wrote: > Step 3: > file block.c > function: > static BlockDriverAIOCB *bdrv_co_aio_rw_vector(BlockDriverState *bs, >int64_t sector_num, >QEMUIOVecto

Re: [Qemu-devel] questions about the bdrv_co_do_readv()

2013-08-27 Thread Yaodong Yang
I checked the argument, it looks like the same. I guess my confusion is the follows: code version: qemu-1.5.1 step 1: file: block-migration.c, function: static int mig_save_device_bulk(QEMUFile *f, BlkMigDevState *bmds) Inside this function, qemu calls the following function to read a

Re: [Qemu-devel] questions about the bdrv_co_do_readv()

2013-08-27 Thread Stefan Hajnoczi
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 >

[Qemu-devel] questions about the bdrv_co_do_readv()

2013-08-26 Thread Yaodong Yang
In the block-migration period, each chunk of data is read by bdrv_aio_readv(), then bdrv_co_aio_rw_vector() , then bdrv_co_do_rw(). Inside the bdrv_co_do_rw() function, the bdrv_co_do_readv() function is called twice. and exit without finish the execution of the bdrv_co_do_readv() function. Al