From patchwork Thu Nov 5 12:08:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: virtio-blk: Pass read errors to the guest Date: Thu, 05 Nov 2009 02:08:59 -0000 From: Kevin Wolf X-Patchwork-Id: 37755 Message-Id: <1257422939-5698-1-git-send-email-kwolf@redhat.com> To: qemu-devel@nongnu.org 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 --- 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)