]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block: Fix error code in multiwrite for immediate failures
authorKevin Wolf <kwolf@redhat.com>
Tue, 6 Apr 2010 16:24:06 +0000 (18:24 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 9 Apr 2010 23:15:44 +0000 (01:15 +0200)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 0f0b604b00851f2c7160b4195136c1fd27418088)

block.c

diff --git a/block.c b/block.c
index 06e22a6155a62ec886a750daccc9329036ef344e..d537d10b680bf14125473424babfef95bb95d35e 100644 (file)
--- 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 {