From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Eric Blake <eblake@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER
Date: Wed, 22 Dec 2021 19:27:34 +0100 [thread overview]
Message-ID: <55fec69e-5a1f-e4c6-594e-067dd5bf6f07@redhat.com> (raw)
In-Reply-To: <87h7b1dsqz.fsf@dusky.pond.sub.org>
On 12/22/21 08:05, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>
>> Do not list vhost-user-blk in BlockExportType
>> when CONFIG_VHOST_USER_BLK_SERVER is disabled.
>>
>> Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API")
>
> My immediate reaction was "what exactly is broken before this patch?"
>
> I think it's introspection: query-qmp-schema has vhost-user-blk even
> though it's not actually available. Let's spell that out.
Yes, OK.
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> qapi/block-export.json | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/qapi/block-export.json b/qapi/block-export.json
>> index c1b92ce1c1c..6bc29a75dc0 100644
>> --- a/qapi/block-export.json
>> +++ b/qapi/block-export.json
>> @@ -277,7 +277,8 @@
>> # Since: 4.2
>> ##
>> { 'enum': 'BlockExportType',
>> - 'data': [ 'nbd', 'vhost-user-blk',
>> + 'data': [ 'nbd',
>> + { 'name': 'vhost-user-blk', 'if': 'CONFIG_VHOST_USER_BLK_SERVER' },
>> { 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] }
>>
>> ##
>
> Doesn't compile when I configure --disable-vhost-user. Fix:
>
> diff --git a/qapi/block-export.json b/qapi/block-export.json
> index 6bc29a75dc..f9ce79a974 100644
> --- a/qapi/block-export.json
> +++ b/qapi/block-export.json
> @@ -320,7 +320,8 @@
> 'discriminator': 'type',
> 'data': {
> 'nbd': 'BlockExportOptionsNbd',
> - 'vhost-user-blk': 'BlockExportOptionsVhostUserBlk',
> + 'vhost-user-blk': { 'type': 'BlockExportOptionsVhostUserBlk',
> + 'if': 'CONFIG_VHOST_USER_BLK_SERVER' },
> 'fuse': { 'type': 'BlockExportOptionsFuse',
> 'if': 'CONFIG_FUSE' }
> } }
Oh, thank you very much for fixing this part!
prev parent reply other threads:[~2021-12-22 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 20:00 [PATCH 0/2] block: Minor vhost-user-blk fixes Philippe Mathieu-Daudé
2021-12-20 20:00 ` [PATCH 1/2] qemu-storage-daemon: Add vhost-user-blk help Philippe Mathieu-Daudé
2021-12-20 20:00 ` [PATCH 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER Philippe Mathieu-Daudé
2021-12-22 7:05 ` Markus Armbruster
2021-12-22 18:27 ` Philippe Mathieu-Daudé [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=55fec69e-5a1f-e4c6-594e-067dd5bf6f07@redhat.com \
--to=philmd@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.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).