qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH v6 02/39] block: Set BDRV_O_INCOMING in bdrv_fill_op


From: Max Reitz
Subject: [Qemu-block] [PATCH v6 02/39] block: Set BDRV_O_INCOMING in bdrv_fill_options()
Date: Mon, 12 Oct 2015 22:00:05 +0200

This flag should not be set for the root BDS only, but for any BDS that
is being created while incoming migration is pending, so setting it is
moved from blockdev_init() to bdrv_fill_options().

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
---
 block.c    | 4 ++++
 blockdev.c | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/block.c b/block.c
index f38146e..0ae3fcf 100644
--- a/block.c
+++ b/block.c
@@ -1076,6 +1076,10 @@ static int bdrv_fill_options(QDict **options, const char 
**pfilename,
         }
     }
 
+    if (runstate_check(RUN_STATE_INMIGRATE)) {
+        *flags |= BDRV_O_INCOMING;
+    }
+
     return 0;
 }
 
diff --git a/blockdev.c b/blockdev.c
index 6c8cce4..f937526 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -539,10 +539,6 @@ static BlockBackend *blockdev_init(const char *file, QDict 
*bs_opts,
             bdrv_flags |= BDRV_O_COPY_ON_READ;
         }
 
-        if (runstate_check(RUN_STATE_INMIGRATE)) {
-            bdrv_flags |= BDRV_O_INCOMING;
-        }
-
         bdrv_flags |= ro ? 0 : BDRV_O_RDWR;
 
         blk = blk_new_open(qemu_opts_id(opts), file, NULL, bs_opts, bdrv_flags,
-- 
2.6.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]