Skip to content

Commit

Permalink
blockdev: open images with BDRV_O_INCOMING on incoming live migration
Browse files Browse the repository at this point in the history
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.canet@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Benoît Canet authored and kevmw committed Apr 5, 2012
1 parent 0778926 commit ed9d420
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blockdev.c
Expand Up @@ -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;
Expand Down

0 comments on commit ed9d420

Please sign in to comment.