[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/37] block: Set BDRV_O_INCOMING in bdrv_fill_option
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 02/37] block: Set BDRV_O_INCOMING in bdrv_fill_options() |
Date: |
Fri, 23 Oct 2015 19:00:49 +0200 |
From: Max Reitz <address@hidden>
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>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 4 ++++
blockdev.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index 6771c3a..d1bf121 100644
--- a/block.c
+++ b/block.c
@@ -1081,6 +1081,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 8141b6b..27398b1 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -537,10 +537,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,
--
1.8.3.1
- [Qemu-devel] [PULL 00/37] Block layer patches, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 01/37] block: Remove host floppy support, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 02/37] block: Set BDRV_O_INCOMING in bdrv_fill_options(),
Kevin Wolf <=
- [Qemu-devel] [PULL 03/37] blockdev: Allow creation of BDS trees without BB, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 04/37] iotests: Only create BB if necessary, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 05/37] block: Make bdrv_is_inserted() return a bool, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 06/37] block: Add blk_is_available(), Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 07/37] block: Make bdrv_is_inserted() recursive, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 08/37] block/raw_bsd: Drop raw_is_inserted(), Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 09/37] block: Invoke change media CB before NULLing drv, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 10/37] hw/block/fdc: Implement tray status, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 11/37] hw/usb-storage: Check whether BB is inserted, Kevin Wolf, 2015/10/23
- [Qemu-devel] [PULL 15/37] block: Move BlockAcctStats into BlockBackend, Kevin Wolf, 2015/10/23