From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LruH6-0005aL-SH for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:26:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LruH2-0005YB-PZ for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:26:36 -0400 Received: from [199.232.76.173] (port=35063 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LruH2-0005Y2-Ku for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:26:32 -0400 Received: from verein.lst.de ([213.95.11.210]:57050) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LruH1-0006xz-Sr for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:26:32 -0400 Date: Thu, 9 Apr 2009 15:26:29 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] qemu-io: Fix handling of bdrv_is_allocated() return value Message-ID: <20090409132629.GA17531@lst.de> References: <1239282327-1039-1-git-send-email-kwolf@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1239282327-1039-1-git-send-email-kwolf@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf On Thu, Apr 09, 2009 at 03:05:27PM +0200, Kevin Wolf wrote: > bdrv_is_allocated() returns a boolean which indicates if the offset is > allocated, not 0 on success and everything else is an error. Yeah, the handling wa wrong before. But a return value of 0 and *pnum = 0 seems to be a special error-ish value still which we might want to handle.