Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzBa1-0001tj-TJ for qemu-devel@nongnu.org; Tue, 06 Apr 2010 12:24:46 -0400 Received: from [140.186.70.92] (port=41665 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzBZz-0001py-GC for qemu-devel@nongnu.org; Tue, 06 Apr 2010 12:24:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzBZy-0006v8-4z for qemu-devel@nongnu.org; Tue, 06 Apr 2010 12:24:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12019) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzBZx-0006v4-TW for qemu-devel@nongnu.org; Tue, 06 Apr 2010 12:24:42 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o36GOfLV016588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Apr 2010 12:24:41 -0400 From: Kevin Wolf Date: Tue, 6 Apr 2010 18:24:06 +0200 Message-Id: <1270571047-1208-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1270571047-1208-1-git-send-email-kwolf@redhat.com> References: <1270571047-1208-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] block: Fix error code in multiwrite for immediate failures List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com Signed-off-by: Kevin Wolf --- block.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 9233af1..ae5aba3 100644 --- a/block.c +++ b/block.c @@ -1890,10 +1890,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 { -- 1.6.6.1