From: BenoƮt Canet <benoit.ca...@gmail.com> Open images with BDRV_O_INCOMING in order to inform block drivers that an incoming live migration is coming.
Signed-off-by: Benoit Canet <benoit.ca...@gmail.com> Reviewed-by: Stefan Hajnoczi <stefa...@gmail.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> --- blockdev.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index 4d17486..0c2440e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -595,6 +595,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) bdrv_flags |= BDRV_O_COPY_ON_READ; } + if (runstate_check(RUN_STATE_INMIGRATE)) { + bdrv_flags |= BDRV_O_INCOMING; + } + if (media == MEDIA_CDROM) { /* CDROM is fine for any interface, don't check. */ ro = 1; -- 1.7.6.5