[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] qmp: fill in the image field in BlockDeviceInfo
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH] qmp: fill in the image field in BlockDeviceInfo |
Date: |
Tue, 21 Apr 2015 15:43:35 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 21.04.2015 um 15:28 hat Stefan Hajnoczi geschrieben:
> 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 <address@hidden>
> > ---
> > 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(-)
>
> For the record, the following patch has been merged instead:
> [PATCH for-2.3] hmp: fix crash in 'info block -n -v'
That was just a minimal stopgap solution that could still be applied
after -rc3. We should revert it in block-next and apply this one as a
replacement (after proper review, of course).
Kevin
pgpeO9rjaZygt.pgp
Description: PGP signature