From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoV0L-0007mG-D8 for qemu-devel@nongnu.org; Fri, 08 Apr 2016 07:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoV0I-0005BB-6R for qemu-devel@nongnu.org; Fri, 08 Apr 2016 07:55:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoV0I-0005B3-1E for qemu-devel@nongnu.org; Fri, 08 Apr 2016 07:55:10 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C71B8AE72 for ; Fri, 8 Apr 2016 11:55:09 +0000 (UTC) Date: Fri, 8 Apr 2016 13:55:07 +0200 From: Kevin Wolf Message-ID: <20160408115507.GF4700@noname.redhat.com> References: <1460040754-108375-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460040754-108375-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.6] vpc: fix return value check for blk_pwrite List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 07.04.2016 um 16:52 hat Paolo Bonzini geschrieben: > bdrv_pwrite_sync used to return zero or negative error, while blk_pwrite returns > the number of written bytes when successful. This caused VPC image creation > to fail spectacularly: it wrote the first 512 bytes, and then exited immediately > because of the non-zero answer from blk_pwrite. But the truly spectacular part > is that it returns a positive value (the 512 that blk_pwrite returned) causing > everyone to believe that it succeeded. > > This fixes qemu-iotests with vpc format. > > Fixes: b8f45cdf7827e39f9a1e6cc446f5972cc6144237 > Signed-off-by: Paolo Bonzini Thanks, applied to the block branch. Kevin