On Tue, Mar 06, 2012 at 06:32:21PM +0100, BenoƮt Canet wrote: > This function will help to inform the block layer that an incoming > live migration is coming in order to make proper usage of the > BDRV_O_INCOMING flag. > > Signed-off-by: Benoit Canet <benoit.ca...@gmail.com> > --- > block.c | 8 ++++++++ > block.h | 2 ++ > 2 files changed, 10 insertions(+), 0 deletions(-)
The block layer doesn't need to keep track of incoming migrations: blockdev.c:drive_init() or vl.c:drive_init_func() could use runstate_check(RUN_STATE_INMIGRATE) to check whether incoming migration is in progress. If so, they would pass in BDRV_O_INCOMING during image creation. As a result we don't need to introduce this global variable or functions to manipulate it in the block layer. The block layer post migration function will still need to clear BDRV_O_INCOMING from open_flags. Stefan