[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/9] block/vdi: Don't ignore immediate read/write fa
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 1/9] block/vdi: Don't ignore immediate read/write failures |
Date: |
Wed, 16 Mar 2011 11:47:53 +0100 |
From: Stefan Weil <address@hidden>
This patch is similar to 171e3d6b9997c98a97d0c525867f7cd9b640cadd
which fixed qcow2:
Returning -EIO is far from optimal, but at least it's an error code.
Cc: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vdi.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/block/vdi.c b/block/vdi.c
index 116b25b..9054079 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -610,6 +610,7 @@ static void vdi_aio_read_cb(void *opaque, int ret)
acb->hd_aiocb = bdrv_aio_readv(bs->file, offset, &acb->hd_qiov,
n_sectors, vdi_aio_read_cb, acb);
if (acb->hd_aiocb == NULL) {
+ ret = -EIO;
goto done;
}
}
@@ -673,6 +674,7 @@ static void vdi_aio_write_cb(void *opaque, int ret)
acb->hd_aiocb = bdrv_aio_writev(bs->file, 0, &acb->hd_qiov, 1,
vdi_aio_write_cb, acb);
if (acb->hd_aiocb == NULL) {
+ ret = -EIO;
goto done;
}
return;
@@ -702,6 +704,7 @@ static void vdi_aio_write_cb(void *opaque, int ret)
acb->hd_aiocb = bdrv_aio_writev(bs->file, offset, &acb->hd_qiov,
n_sectors, vdi_aio_write_cb, acb);
if (acb->hd_aiocb == NULL) {
+ ret = -EIO;
goto done;
}
return;
@@ -752,6 +755,7 @@ static void vdi_aio_write_cb(void *opaque, int ret)
&acb->hd_qiov, s->block_sectors,
vdi_aio_write_cb, acb);
if (acb->hd_aiocb == NULL) {
+ ret = -EIO;
goto done;
}
} else {
@@ -764,6 +768,7 @@ static void vdi_aio_write_cb(void *opaque, int ret)
acb->hd_aiocb = bdrv_aio_writev(bs->file, offset, &acb->hd_qiov,
n_sectors, vdi_aio_write_cb, acb);
if (acb->hd_aiocb == NULL) {
+ ret = -EIO;
goto done;
}
}
--
1.7.2.3
- [Qemu-devel] [PULL 0/9] Block patches, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 2/9] block/qcow: Don't ignore immediate read/write and other failures, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 1/9] block/vdi: Don't ignore immediate read/write failures,
Kevin Wolf <=
- [Qemu-devel] [PATCH 5/9] Don't allow multiwrites against a block device without underlying medium, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 3/9] Add error message for loading snapshot without VM state, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 4/9] tools: Use real async.c instead of stubs, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 6/9] Fix ATA SMART and CHECK POWER MODE, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 7/9] Improve error handling in do_snapshot_blkdev(), Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 8/9] hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 9/9] Add qcow2 documentation, Kevin Wolf, 2011/03/16
- [Qemu-devel] Re: [PULL 0/9] Block patches, Kevin Wolf, 2011/03/21