From patchwork Tue Apr 6 16:24:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 49528 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D7D8EB7D26 for ; Wed, 7 Apr 2010 02:32:30 +1000 (EST) Received: from localhost ([127.0.0.1]:52729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzBhS-0000kd-OL for incoming@patchwork.ozlabs.org; Tue, 06 Apr 2010 12:32:26 -0400 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 Received: from localhost.localdomain (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o36GObqP026479; Tue, 6 Apr 2010 12:24:39 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH 1/2] block: Fix error code in multiwrite for immediate failures X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 {