[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-io: Fix handling of bdrv_is_allocated() re

From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] qemu-io: Fix handling of bdrv_is_allocated() return value
Date: Thu, 09 Apr 2009 15:42:22 +0200
User-agent: Thunderbird (X11/20090320)

Christoph Hellwig schrieb:
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

The header comment of bdrv_is_allocated() doesn't specify error conditions. ;-)

You seem to be right that there is one place in block.c where *pnum = 0 is used as something like an error return value. This isn't consistent though, qcow and vmdk return non-zero values in *pnum under the same conditions.

Maybe another patch to change that and bring the error message back again on *pnum == 0?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]