From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Uxz-0000uf-Rj for qemu-devel@nongnu.org; Tue, 08 Jul 2014 08:57:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4Uxs-0005oa-7p for qemu-devel@nongnu.org; Tue, 08 Jul 2014 08:57:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Uxs-0005oN-0W for qemu-devel@nongnu.org; Tue, 08 Jul 2014 08:57:44 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s68Cvgv4003759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 8 Jul 2014 08:57:42 -0400 Date: Tue, 8 Jul 2014 14:57:41 +0200 From: Kevin Wolf Message-ID: <20140708125741.GC3857@noname.str.redhat.com> References: <1404747446-10215-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1404747446-10215-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.1] block: Fix bdrv_is_allocated() return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com Am 07.07.2014 um 17:37 hat Kevin Wolf geschrieben: > bdrv_is_allocated() should return either 0 or 1 in successful cases. > We're lucky that currently, the callers that rely on this (e.g. because > they check for ret == 1) don't seem to break badly. They just might skip > some optimisation or in the case of qemu-io 'map' print separate lines > where a single line would suffice. In theory, a wrong allocation status > could lead to image corruption with certain operations, so let's fix > this quickly. > > Signed-off-by: Kevin Wolf Applied to the block branch. Kevin