From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: berto@igalia.com, stefanha@redhat.com, qemu-block@nongnu.org,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.4 2/5] block: Introduce bdrv_open_child()
Date: Fri, 10 Jul 2015 18:39:02 +0200 [thread overview]
Message-ID: <20150710163902.GB3870@noname.redhat.com> (raw)
In-Reply-To: <559FE9FE.3040005@redhat.com>
Am 10.07.2015 um 17:51 hat Max Reitz geschrieben:
> On 08.07.2015 21:36, Kevin Wolf wrote:
> >It is the same as bdrv_open_image(), except that it doesn't only return
> >success or failure, but the newly created BdrvChild object for the new
> >child node.
> >
> >As the BdrvChild object already contains a BlockDriverState pointer (and
> >this is supposed to become the only pointer so that bdrv_append() and
> >friends can just change a single pointer in BdrvChild), the pbs
> >parameter is removed for bdrv_open_child().
> >
> >Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> >---
> > block.c | 71 +++++++++++++++++++++++++++++++++++++--------------
> > include/block/block.h | 6 +++++
> > 2 files changed, 58 insertions(+), 19 deletions(-)
>
> Are you planning on removing bdrv_open_image() later on? Because the
> version introduced here behaves differently than the one before this
> patch, in that before the error value returned by bdrv_open() was
> preserved.
Yes. As I wrote in the cover letter, this is just the start of my
bdrv_swap series. The current status of it can be seen here:
http://repo.or.cz/w/qemu/kevin.git/shortlog/refs/heads/bdrv_swap
All callers of bdrv_open_image() are converted to bdrv_open_child()
there and bdrv_open_image() is removed eventually. (The -EINVAL stays,
however, it's just moved to the callers.)
> I don't think this is noticeable at all, though, since as long as
> there is an Error object involved, the exact value returned doesn't
> really matter (but I can't verify that assumption, since the value
> returned by bdrv_open_image() seems to be preserved by a lot of
> nested function calls).
Right, that's my assumption as well. If .bdrv_open() returns an Error,
the exact return code shouldn't matter as long as it's negative.
Kevin
next prev parent reply other threads:[~2015-07-10 16:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 19:36 [Qemu-devel] [PATCH for-2.4 0/5] block: Fix backing file child when modifying graph Kevin Wolf
2015-07-08 19:36 ` [Qemu-devel] [PATCH for-2.4 1/5] block: Move bdrv_attach_child() calls up the call chain Kevin Wolf
2015-07-10 15:33 ` Max Reitz
2015-07-08 19:36 ` [Qemu-devel] [PATCH for-2.4 2/5] block: Introduce bdrv_open_child() Kevin Wolf
2015-07-10 15:51 ` Max Reitz
2015-07-10 16:39 ` Kevin Wolf [this message]
2015-07-08 19:36 ` [Qemu-devel] [PATCH for-2.4 3/5] block: Introduce bdrv_unref_child() Kevin Wolf
2015-07-10 16:00 ` Max Reitz
2015-07-08 19:36 ` [Qemu-devel] [PATCH for-2.4 4/5] block: Reorder cleanups in bdrv_close() Kevin Wolf
2015-07-10 16:05 ` Max Reitz
2015-07-08 19:36 ` [Qemu-devel] [PATCH for-2.4 5/5] block: Fix backing file child when modifying graph Kevin Wolf
2015-07-10 16:13 ` Max Reitz
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=20150710163902.GB3870@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=berto@igalia.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).