From: Kevin Wolf <kwolf@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-io: Fix handling of bdrv_is_allocated() return value
Date: Thu, 09 Apr 2009 15:42:22 +0200 [thread overview]
Message-ID: <49DDFB3E.1060309@redhat.com> (raw)
In-Reply-To: <20090409132629.GA17531@lst.de>
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
> handle.
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?
Kevin
next prev parent reply other threads:[~2009-04-09 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 13:05 [Qemu-devel] [PATCH] qemu-io: Fix handling of bdrv_is_allocated() return value Kevin Wolf
2009-04-09 13:26 ` Christoph Hellwig
2009-04-09 13:42 ` Kevin Wolf [this message]
2009-04-09 15:28 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49DDFB3E.1060309@redhat.com \
--to=kwolf@redhat.com \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.