diff options
-rw-r--r-- | block.c | 4 | ||||
-rw-r--r-- | blockdev.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -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 8141b6b3da..27398b1041 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, |