提交 f74550fd 编写于 作者: K Kevin Wolf

qcow2: Don't try to check tables that couldn't be loaded

Trying to check them leads to a second error message which is more confusing
than helpful:

    Can't get refcount for cluster 0: Invalid argument
    ERROR cluster 0 refcount=-22 reference=1
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 6882c8fa
...@@ -1174,6 +1174,7 @@ int qcow2_check_refcounts(BlockDriverState *bs) ...@@ -1174,6 +1174,7 @@ int qcow2_check_refcounts(BlockDriverState *bs)
if (refcount1 < 0) { if (refcount1 < 0) {
fprintf(stderr, "Can't get refcount for cluster %d: %s\n", fprintf(stderr, "Can't get refcount for cluster %d: %s\n",
i, strerror(-refcount1)); i, strerror(-refcount1));
continue;
} }
refcount2 = refcount_table[i]; refcount2 = refcount_table[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册