提交 171e3d6b 编写于 作者: K Kevin Wolf 提交者: Aurelien Jarno

qcow2: Don't ignore immediate read/write failures

Returning -EIO is far from optimal, but at least it's an error code.
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 7eb58a6c
......@@ -468,8 +468,10 @@ static void qcow_aio_read_cb(void *opaque, int ret)
(acb->cluster_offset >> 9) + index_in_cluster,
&acb->hd_qiov, acb->cur_nr_sectors,
qcow_aio_read_cb, acb);
if (acb->hd_aiocb == NULL)
if (acb->hd_aiocb == NULL) {
ret = -EIO;
goto done;
}
}
return;
......@@ -621,8 +623,10 @@ static void qcow_aio_write_cb(void *opaque, int ret)
(acb->cluster_offset >> 9) + index_in_cluster,
&acb->hd_qiov, acb->cur_nr_sectors,
qcow_aio_write_cb, acb);
if (acb->hd_aiocb == NULL)
if (acb->hd_aiocb == NULL) {
ret = -EIO;
goto done;
}
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册