From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykrjj-0007Gd-Dc for qemu-devel@nongnu.org; Wed, 22 Apr 2015 06:18:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykrjg-0004VN-74 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 06:18:31 -0400 Date: Wed, 22 Apr 2015 11:18:24 +0100 From: Stefan Hajnoczi Message-ID: <20150422101824.GF6581@stefanha-thinkpad.redhat.com> References: <1429271563-3765-1-git-send-email-berto@igalia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FeAIMMcddNRN4P4/" Content-Disposition: inline In-Reply-To: <1429271563-3765-1-git-send-email-berto@igalia.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qmp: fill in the image field in BlockDeviceInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, qemu-block@nongnu.org --FeAIMMcddNRN4P4/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > This patch moves the code that fills in that field from > bdrv_query_info() to bdrv_block_device_info(). >=20 > Signed-off-by: Alberto Garcia > --- > 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 --FeAIMMcddNRN4P4/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVN3VwAAoJEJykq7OBq3PI2t0IAIr8zVF1L8n5bTEqEQP4APQ7 WikFJfAFnaaVuz9DgI1TXGQT6ei69GIN0FeViWZSQdy/2uFPBy1rwB0MHq6k7Nu9 zqhaWeiZ1KA115u1Mhteg+P9uHulSKdn1sWulbpoX9AzVV+NFrQss67AiwXDFVpl AhD/6KDHUuv7GmYhqt48lSLrjWcPc4dHrwAI3DmIZdquKHLTrd8p1jANHdatyL7w TiE36EIJUid9ZKO7SEwfchIOi2yQ3YLorz7kByhcJ5g5Ldj+Ig6azmq0RuFzxSJj uT2fjR1wWM+Q6ctm6oVYK2Z1kdr4WyD9w6XjQzcjpB2ezsAixkJa8KgPa/ZA9eE= =BB4y -----END PGP SIGNATURE----- --FeAIMMcddNRN4P4/--