diff options
author | BenoƮt Canet <benoit.canet@gmail.com> | 2012-03-23 08:36:50 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-05 16:28:16 +0200 |
commit | ed9d4205cecb2f6c06821cb9d8fe9e1ca5f9b8ab (patch) | |
tree | ccf7c792fcf0fc2fbda1ba2345611462cdde3480 /blockdev.c | |
parent | 077892696b900ebf88052fef917367213db80477 (diff) | |
download | qemu-ed9d4205cecb2f6c06821cb9d8fe9e1ca5f9b8ab.tar.gz qemu-ed9d4205cecb2f6c06821cb9d8fe9e1ca5f9b8ab.tar.bz2 qemu-ed9d4205cecb2f6c06821cb9d8fe9e1ca5f9b8ab.zip |
blockdev: open images with BDRV_O_INCOMING on incoming live migration
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>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index 4d17486e31..0c2440e249 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; |