From patchwork Fri Apr 9 09:46:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [STABLE, 07/10] block: Fix error code in multiwrite for immediate failures From: Kevin Wolf X-Patchwork-Id: 49808 Message-Id: <1270806388-28138-8-git-send-email-kwolf@redhat.com> To: aurelien@aurel32.net Cc: kwolf@redhat.com, qemu-devel@nongnu.org Date: Fri, 9 Apr 2010 11:46:25 +0200 Signed-off-by: Kevin Wolf --- block.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 06e22a6..d537d10 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 {