From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alberto Garcia <berto@igalia.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qmp: fill in the image field in BlockDeviceInfo
Date: Wed, 22 Apr 2015 11:18:24 +0100 [thread overview]
Message-ID: <20150422101824.GF6581@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1429271563-3765-1-git-send-email-berto@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
On Fri, Apr 17, 2015 at 02:52:43PM +0300, Alberto Garcia wrote:
> The image field in BlockDeviceInfo is supposed to contain an ImageInfo
> object. However that is being filled in by bdrv_query_info(), not by
> bdrv_block_device_info(), which is where BlockDeviceInfo is actually
> created.
>
> Anyone calling bdrv_block_device_info() directly will get a null image
> field. As a consequence of this, the HMP command 'info block -n -v'
> crashes QEMU.
>
> This patch moves the code that fills in that field from
> bdrv_query_info() to bdrv_block_device_info().
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> block.c | 9 +++++++--
> block/qapi.c | 46 +++++++++++++++++++++++++---------------------
> blockdev.c | 2 +-
> include/block/block.h | 2 +-
> include/block/qapi.h | 2 +-
> 5 files changed, 35 insertions(+), 26 deletions(-)
Reverted the QEMU 2.3 fix and replaced it with this commit.
Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-04-22 10:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 11:52 [Qemu-devel] [PATCH] qmp: fill in the image field in BlockDeviceInfo Alberto Garcia
2015-04-17 12:14 ` Alberto Garcia
2015-04-21 13:28 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-21 13:43 ` Kevin Wolf
2015-04-22 10:18 ` Stefan Hajnoczi [this message]
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=20150422101824.GF6581@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=berto@igalia.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).