aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2009-11-05 13:08:59 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-12 11:23:55 -0600
commit49c3c8dca7b324d0aed590bb747be2179cc631cc (patch)
treed49ff71d86facb34ddba1800bb602cc6aa8c5717
parentcb499fb295a91a65f86eccfa95f90da60b027395 (diff)
virtio-blk: Pass read errors to the guest
We need to signal not only write errors, but also read errors to the guest driver. This fixes a regression introduced by 869a5c6d. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/virtio-blk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index e6df9f2619..42b766fa2c 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -127,7 +127,7 @@ static void virtio_blk_rw_complete(void *opaque, int ret)
return;
}
- virtio_blk_req_complete(req, VIRTIO_BLK_S_OK);
+ virtio_blk_req_complete(req, ret ? VIRTIO_BLK_S_IOERR : VIRTIO_BLK_S_OK);
}
static void virtio_blk_flush_complete(void *opaque, int ret)