All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-blk: Pass read errors to the guest
@ 2009-11-05 12:08 Kevin Wolf
  0 siblings, 0 replies; only message in thread
From: Kevin Wolf @ 2009-11-05 12:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf

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>
---
 hw/virtio-blk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 2630b99..dd196df 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)
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-05 12:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-05 12:08 [Qemu-devel] [PATCH] virtio-blk: Pass read errors to the guest Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.