From ffac613ff988db0eed39f97ec0005eb6ffe2f638 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 6 Apr 2010 18:24:06 +0200 Subject: block: Fix error code in multiwrite for immediate failures Signed-off-by: Kevin Wolf Signed-off-by: Aurelien Jarno (cherry picked from commit 0f0b604b00851f2c7160b4195136c1fd27418088) --- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 06e22a615..d537d10b6 100644 --- a/block.c +++ b/block.c @@ -1758,10 +1758,10 @@ int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs) // submitted yet. Otherwise we'll wait for the submitted AIOs to // complete and report the error in the callback. if (mcb->num_requests == 0) { - reqs[i].error = EIO; + reqs[i].error = -EIO; goto fail; } else { - mcb->error = EIO; + mcb->error = -EIO; break; } } else { -- cgit v1.2.3-65-gdbad