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>
This commit is contained in:
Kevin Wolf 2010-10-27 13:10:15 +02:00
parent b2df7531f3
commit 18a8d4214b

View File

@ -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); acb = bdrv_aio_flush(req->dev->bs, virtio_blk_flush_complete, req);
if (!acb) { if (!acb) {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR); virtio_blk_flush_complete(req, -EIO);
} }
} }