From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs6aH-0006pW-IH for qemu-devel@nongnu.org; Thu, 06 Oct 2016 07:11:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bs6aG-0001t3-ET for qemu-devel@nongnu.org; Thu, 06 Oct 2016 07:11:29 -0400 Date: Thu, 6 Oct 2016 13:11:20 +0200 From: Kevin Wolf Message-ID: <20161006111120.GB5188@noname.redhat.com> References: <1475746836-16162-1-git-send-email-kwolf@redhat.com> <20161006105848.GQ16414@wheatley> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <20161006105848.GQ16414@wheatley> Subject: Re: [Qemu-devel] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Martin Kletzander Cc: qemu-block@nongnu.org, mprivozn@redhat.com, eblake@redhat.com, mreitz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 06.10.2016 um 12:58 hat Martin Kletzander geschrieben: > On Thu, Oct 06, 2016 at 11:40:36AM +0200, Kevin Wolf wrote: > >Recently we moved a few options from QemuOptsLists in blockdev.c to > >bdrv_runtime_opts in block.c in order to make them accissble using > >blockdev-add. However, this has the side effect that these options are > >missing from query-command-line-options now, and libvirt consequently > >disables the corresponding feature. > > > >This problem was reported as a regression for the 'discard' option, > >introduced in commit 818584a4. However, it is more general than that. > > > >Fix it by adding bdrv_runtime_opts to the list of QemuOptsLists that are > >returned in query-command-line-options. For the future, libvirt is > >advised to use QMP schema introspection for block device options. > > > >Reported-by: Michal Privoznik > >Signed-off-by: Kevin Wolf > >--- > >block.c | 2 +- > >include/sysemu/sysemu.h | 1 + > >util/qemu-config.c | 2 +- > >vl.c | 1 + > >4 files changed, 4 insertions(+), 2 deletions(-) > > > >diff --git a/block.c b/block.c > >index bb1f1ec..40eb570 100644 > >--- a/block.c > >+++ b/block.c > >@@ -926,7 +926,7 @@ out: > > g_free(gen_node_name); > >} > > > >-static QemuOptsList bdrv_runtime_opts =3D { > >+QemuOptsList bdrv_runtime_opts =3D { > > .name =3D "bdrv_common", > > .head =3D QTAILQ_HEAD_INITIALIZER(bdrv_runtime_opts.head), > > .desc =3D { > >diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h > >index ef2c50b..b668833 100644 > >--- a/include/sysemu/sysemu.h > >+++ b/include/sysemu/sysemu.h > >@@ -235,6 +235,7 @@ bool defaults_enabled(void); > >extern QemuOptsList qemu_legacy_drive_opts; > >extern QemuOptsList qemu_common_drive_opts; > >extern QemuOptsList qemu_drive_opts; > >+extern QemuOptsList bdrv_runtime_opts; > >extern QemuOptsList qemu_chardev_opts; > >extern QemuOptsList qemu_device_opts; > >extern QemuOptsList qemu_netdev_opts; > >diff --git a/util/qemu-config.c b/util/qemu-config.c > >index fb97307..5527100 100644 > >--- a/util/qemu-config.c > >+++ b/util/qemu-config.c > >@@ -6,7 +6,7 @@ > >#include "qmp-commands.h" > > > >static QemuOptsList *vm_config_groups[48]; > >-static QemuOptsList *drive_config_groups[4]; > >+static QemuOptsList *drive_config_groups[5]; > > > >static QemuOptsList *find_list(QemuOptsList **lists, const char *group, > > Error **errp) > >diff --git a/vl.c b/vl.c > >index f3abd99..9a2e7d5 100644 > >--- a/vl.c > >+++ b/vl.c > >@@ -3035,6 +3035,7 @@ int main(int argc, char **argv, char **envp) > > qemu_add_drive_opts(&qemu_legacy_drive_opts); > > qemu_add_drive_opts(&qemu_common_drive_opts); >=20 > I'm guessing this doesn't pose a problem with e.g.g "detect-zeroes" > which is in this (&qemu_common_drive_opts) as well as >=20 > > qemu_add_drive_opts(&qemu_drive_opts); > >+ qemu_add_drive_opts(&bdrv_runtime_opts); >=20 > here ^^, right? Just wanted to make sure ;) Thanks for the fix. Yes, cleanup_infolist() removes duplicates before they are sent to the client. Kevin --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJX9jFYAAoJEH8JsnLIjy/WTncP/1RnLRSIQxmolzYk0EqIFqt6 9HmvOm2PNXnwlhpxhPP588sDM5WpXB3N4IfGVBmRG2BCrqlSSUR9bR5zmlru27a/ TDr3j1s2ERQv4MfnKTU8DYefIl8y6+X12H/LRtds1p9nqEz+B7oXg6gxD0Pa2K8/ TA5/Rnx6bezyShaOrUN1Xj8dwzA/fGfkaaiSUrY9AJslvRcJvDuSK/lalyQv+758 1Iw/7nlx7e28YJrcQg3vzPj82ymEJKLmzpNG0UYNh0EHXmJtBtmyx8jNImO3QxMj 5dezjBGW4pW/Ulz+MyGh5DFahcyhT5QrS+J11T5Jx77aMxZks7YYBDzjsZN2RXeG AtrftIXkFF5FyOU+wARj9+Yg7jFKGPgYlfGR9p1UrCNdVKHh7f6Gi1e5LW0TVbXi AuPLaYTd+XNffLuq0uxDUOGWRpXRrIAXTgcEyVJHjYTKiAguW4nOWUsI2wVgXBAO eowKHZgEAisR0v5Mmh4cFjZ1uhwsTpcDFEVwF79PxJor5zTkjee5c2QiucVBvqbt y58guexDhUTxS2UCi0mGlsomSENU/NlQxq/f9GwetW2GLcBxMuD+r88Y/ZG7SOkB AZSXHTNDr07WG7nppq36PvULC7vhu0twn8oWReJ2TXK59JfJuixXdhmCVCxWnuDm SXMqsPQYKNY2k3Xi3Kf8 =+Hus -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq--