aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-04-06 18:24:06 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-10 00:39:33 +0200
commit0f0b604b00851f2c7160b4195136c1fd27418088 (patch)
tree01bd3f0d8bfb61106c5864191bbf5c146e4c49e5 /block.c
parentcb6d3ca07b8f62b47ef30c6a92caa3e8bd71248b (diff)
block: Fix error code in multiwrite for immediate failures
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c
index 06ed08ad88..1027ff7c5d 100644
--- a/block.c
+++ b/block.c
@@ -1881,10 +1881,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 {