diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2010-10-26 09:50:58 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-10-26 09:50:58 -0500 |
commit | 21bcc5907f4c4a8acffcda8b6662710784cba388 (patch) | |
tree | 0eed92970495fef0729139bd1e8bbe22983e3177 /hw/virtio-blk.c | |
parent | 758c309f0a5cb52441a1ee015566cf9cd96fa933 (diff) | |
parent | 8c269b542c5bbbcd74c1664959b223d941a2893b (diff) |
Merge remote branch 'kwolf/for-anthony' into staging
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r-- | hw/virtio-blk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index a1df26dbcf..dbe207070e 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -106,7 +106,13 @@ static void virtio_blk_flush_complete(void *opaque, int ret) { VirtIOBlockReq *req = opaque; - virtio_blk_req_complete(req, ret ? VIRTIO_BLK_S_IOERR : VIRTIO_BLK_S_OK); + if (ret) { + if (virtio_blk_handle_rw_error(req, -ret, 0)) { + return; + } + } + + virtio_blk_req_complete(req, VIRTIO_BLK_S_OK); } static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s) |