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>
---
 block.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index b0f0288..78287df 100644
--- a/block.c
+++ b/block.c
@@ -575,6 +575,10 @@ static int bdrv_open_common(BlockDriverState *bs, const 
char *filename,
 
     trace_bdrv_open_common(bs, filename, flags, drv->format_name);
 
+    if (incoming_migration) {
+        flags |= BDRV_O_INCOMING;
+    }
+
     bs->file = NULL;
     bs->total_sectors = 0;
     bs->encrypted = 0;
-- 
1.7.7.6


Reply via email to