From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N61AL-0005IK-Os for qemu-devel@nongnu.org; Thu, 05 Nov 2009 07:10:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N61AG-0005Hj-A2 for qemu-devel@nongnu.org; Thu, 05 Nov 2009 07:10:12 -0500 Received: from [199.232.76.173] (port=34426 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N61AG-0005HY-1y for qemu-devel@nongnu.org; Thu, 05 Nov 2009 07:10:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57730) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N61AF-00006H-M4 for qemu-devel@nongnu.org; Thu, 05 Nov 2009 07:10:07 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA5CA5T6011209 for ; Thu, 5 Nov 2009 07:10:05 -0500 From: Kevin Wolf Date: Thu, 5 Nov 2009 13:08:59 +0100 Message-Id: <1257422939-5698-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] virtio-blk: Pass read errors to the guest List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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) -- 1.6.2.5