提交 31f54f24 编写于 作者: S Shahar Havivi 提交者: Kevin Wolf

Block migration fail, ignore error from bdrv_getlength

When there is no block driver associate with BlockDriverState bdrv_getlength
returns -ENOMEDIUM that cause block migration to fail
Signed-off-by: NShahar Havivi <shaharh@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 5fb58b06
......@@ -238,7 +238,7 @@ static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
if (!bdrv_is_read_only(bs)) {
sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;
if (sectors == 0) {
if (sectors <= 0) {
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册