diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-10-27 13:10:15 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-11-04 13:54:37 +0100 |
commit | 18a8d4214b861aff0caa5acfa921862d0be05bbb (patch) | |
tree | 0763617ff7398d34515fd0eb3789c56737d0ea5c /hw/virtio-blk.c | |
parent | b2df7531f3adc4f0f65067b917cef8c66ba812c5 (diff) |
virtio-blk: Handle immediate flush failure properly
Fix virtio-blk to use the usual completion path that involves werror handling
instead of directly completing the request in cases where bdrv_aio_flush
returns NULL.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r-- | 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 dbe207070e..49528a9977 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -273,7 +273,7 @@ static void virtio_blk_handle_flush(VirtIOBlockReq *req, MultiReqBuffer *mrb) acb = bdrv_aio_flush(req->dev->bs, virtio_blk_flush_complete, req); if (!acb) { - virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR); + virtio_blk_flush_complete(req, -EIO); } } |