From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs6OI-0007dJ-8x for qemu-devel@nongnu.org; Thu, 06 Oct 2016 06:59:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bs6OD-0006Zr-AE for qemu-devel@nongnu.org; Thu, 06 Oct 2016 06:59:05 -0400 Date: Thu, 6 Oct 2016 12:58:48 +0200 From: Martin Kletzander Message-ID: <20161006105848.GQ16414@wheatley> References: <1475746836-16162-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="de1H0RjRxOSdb4we" Content-Disposition: inline In-Reply-To: <1475746836-16162-1-git-send-email-kwolf@redhat.com> 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: Kevin Wolf Cc: qemu-block@nongnu.org, mprivozn@redhat.com, eblake@redhat.com, mreitz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com --de1H0RjRxOSdb4we Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline 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 = { >+QemuOptsList bdrv_runtime_opts = { > .name = "bdrv_common", > .head = QTAILQ_HEAD_INITIALIZER(bdrv_runtime_opts.head), > .desc = { >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); 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 > qemu_add_drive_opts(&qemu_drive_opts); >+ qemu_add_drive_opts(&bdrv_runtime_opts); here ^^, right? Just wanted to make sure ;) Thanks for the fix. > qemu_add_opts(&qemu_chardev_opts); > qemu_add_opts(&qemu_device_opts); > qemu_add_opts(&qemu_netdev_opts); >-- >1.8.3.1 > --de1H0RjRxOSdb4we Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJX9i5oAAoJEAgfwp8kF4bdBNcP/1sNjtrhdbA1km8lcoQa0Ikm GKQn3CLjL1HDQeLMSx5LqGxc3I1MmaDpXOcDAoyWJ1MFtCEP+oaiOJWHoE6TPghq ZBpYrvU4ul14ICHkeUbt+nAFWUgJDd+zVS57R45bFUNnnY7qNSOa7tkWyPXEa5Yr ifxUgP64ap6NxILh6hMUaWYL4gi4TvtCY3gP1lDkh9ttpqT1cYz3rM826a9lK8dx zagSLuLR4A7lPiKG3S3g2I7kQLGBLDO4Bx4e+TpmNq4ii721oC8mejy2EUmdxJSo X7N+1GEEJeTc/fLgswWDHwz8zlK1k9ym588l/o4WUq8iCpBSGf1WZR7PCaY6tcK2 rASJr/kdJooOnrfNXWDPWJI3IdXdZNJFuRsMqPpfoXO4mOnVWGi8I0z9pNfhRFB/ /DDZjBxdWxs83MEq7JD608zrErgkBLzrZnzTcZi9WSfPRT+FXYcHE/qu7FgNjuR5 fp/TXFueNSIaFFjMFBPW50RE+7Anc2kdoL8eOa+6ufsEyISTcLSCQSyN61eATvpg A+/Lisim2P31hSm0e+fi3B15VV02vPTxIFJT3bDAxMo4AwQlD8KNSKgZ/TeAK/ro cepgYKXutPAvbw5axHXyMtl7tS0RZiLx5oXEl/tPlAGsd3WDLs5mXKK0e8IX8+vu 4m9LyG1la14nXmDvsMS5 =i9nI -----END PGP SIGNATURE----- --de1H0RjRxOSdb4we--