提交 d44f928a 编写于 作者: M Max Reitz 提交者: Kevin Wolf

block: Set BDRV_O_INCOMING in bdrv_fill_options()

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: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NAlberto Garcia <berto@igalia.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 f709623b
......@@ -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;
}
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册