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. All these calls are inside the migration thread. Later, the iothread will finish the bottom half of the bdrv_co_do_readv() function. I do not why it is executed in this way. 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! Thanks! Yaodong