All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] block: Minor vhost-user-blk fixes
@ 2022-01-07 10:54 Philippe Mathieu-Daudé
  2022-01-07 10:54 ` [PATCH v3 1/3] docs: Correct 'vhost-user-blk' spelling Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-07 10:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Eric Blake, Markus Armbruster, qemu-block,
	Philippe Mathieu-Daudé

- Add vhost-user-blk help to qemu-storage-daemon,
- Do not list vhost-user-blk in BlockExportType when
  CONFIG_VHOST_USER_BLK_SERVER is disabled.

Since v2:
- Fix typo (Eric)

Since v1:
- Reword patch 2 description (Markus)
- Fix BlockExportOptions enum build failure (Markus)

Philippe Mathieu-Daudé (3):
  docs: Correct 'vhost-user-blk' spelling
  qemu-storage-daemon: Add vhost-user-blk help
  qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

 docs/tools/qemu-storage-daemon.rst   |  2 +-
 qapi/block-export.json               |  6 ++++--
 storage-daemon/qemu-storage-daemon.c | 13 +++++++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)

-- 
2.33.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/3] docs: Correct 'vhost-user-blk' spelling
  2022-01-07 10:54 [PATCH v3 0/3] block: Minor vhost-user-blk fixes Philippe Mathieu-Daudé
@ 2022-01-07 10:54 ` Philippe Mathieu-Daudé
  2022-01-07 10:54 ` [PATCH v3 2/3] qemu-storage-daemon: Add vhost-user-blk help Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-07 10:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Eric Blake, Markus Armbruster, qemu-block,
	Philippe Mathieu-Daudé

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 docs/tools/qemu-storage-daemon.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/tools/qemu-storage-daemon.rst b/docs/tools/qemu-storage-daemon.rst
index 3e5a9dc0320..9b0eaba6e5c 100644
--- a/docs/tools/qemu-storage-daemon.rst
+++ b/docs/tools/qemu-storage-daemon.rst
@@ -201,7 +201,7 @@ Export raw image file ``disk.img`` over NBD UNIX domain socket ``nbd.sock``::
       --nbd-server addr.type=unix,addr.path=nbd.sock \
       --export type=nbd,id=export,node-name=disk,writable=on
 
-Export a qcow2 image file ``disk.qcow2`` as a vhosts-user-blk device over UNIX
+Export a qcow2 image file ``disk.qcow2`` as a vhost-user-blk device over UNIX
 domain socket ``vhost-user-blk.sock``::
 
   $ qemu-storage-daemon \
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/3] qemu-storage-daemon: Add vhost-user-blk help
  2022-01-07 10:54 [PATCH v3 0/3] block: Minor vhost-user-blk fixes Philippe Mathieu-Daudé
  2022-01-07 10:54 ` [PATCH v3 1/3] docs: Correct 'vhost-user-blk' spelling Philippe Mathieu-Daudé
@ 2022-01-07 10:54 ` Philippe Mathieu-Daudé
  2022-01-07 10:54 ` [PATCH v3 3/3] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER Philippe Mathieu-Daudé
  2022-01-11 15:54 ` [PATCH v3 0/3] block: Minor vhost-user-blk fixes Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-07 10:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Qing Wang, qemu-block, Eric Blake, Markus Armbruster,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Add missing vhost-user-blk help:

  $ qemu-storage-daemon -h
  ...
    --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,
             addr.type=unix,addr.path=<socket-path>[,writable=on|off]
             [,logical-block-size=<block-size>][,num-queues=<num-queues>]
                           export the specified block node as a
                           vhosts-user-blk device over UNIX domain socket
    --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,
             fd,addr.str=<fd>[,writable=on|off]
             [,logical-block-size=<block-size>][,num-queues=<num-queues>]
                           export the specified block node as a
                           vhosts-user-blk device over file descriptor
  ...

Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API")
Reported-by: Qing Wang <qinwang@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v3: Fix 'vhost-user-blk' spelling (eblake)
---
 storage-daemon/qemu-storage-daemon.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-storage-daemon.c
index 52cf17e8ace..9d76d1114d4 100644
--- a/storage-daemon/qemu-storage-daemon.c
+++ b/storage-daemon/qemu-storage-daemon.c
@@ -104,6 +104,19 @@ static void help(void)
 "                         export the specified block node over FUSE\n"
 "\n"
 #endif /* CONFIG_FUSE */
+#ifdef CONFIG_VHOST_USER_BLK_SERVER
+"  --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,\n"
+"           addr.type=unix,addr.path=<socket-path>[,writable=on|off]\n"
+"           [,logical-block-size=<block-size>][,num-queues=<num-queues>]\n"
+"                         export the specified block node as a\n"
+"                         vhost-user-blk device over UNIX domain socket\n"
+"  --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,\n"
+"           fd,addr.str=<fd>[,writable=on|off]\n"
+"           [,logical-block-size=<block-size>][,num-queues=<num-queues>]\n"
+"                         export the specified block node as a\n"
+"                         vhost-user-blk device over file descriptor\n"
+"\n"
+#endif /* CONFIG_VHOST_USER_BLK_SERVER */
 "  --monitor [chardev=]name[,mode=control][,pretty[=on|off]]\n"
 "                         configure a QMP monitor\n"
 "\n"
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 3/3] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER
  2022-01-07 10:54 [PATCH v3 0/3] block: Minor vhost-user-blk fixes Philippe Mathieu-Daudé
  2022-01-07 10:54 ` [PATCH v3 1/3] docs: Correct 'vhost-user-blk' spelling Philippe Mathieu-Daudé
  2022-01-07 10:54 ` [PATCH v3 2/3] qemu-storage-daemon: Add vhost-user-blk help Philippe Mathieu-Daudé
@ 2022-01-07 10:54 ` Philippe Mathieu-Daudé
  2022-01-11 15:54 ` [PATCH v3 0/3] block: Minor vhost-user-blk fixes Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-07 10:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Eric Blake, Markus Armbruster,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

When building QEMU with --disable-vhost-user and using introspection,
query-qmp-schema lists vhost-user-blk even though it's not actually
available:

  { "execute": "query-qmp-schema" }
  {
      "return": [
          ...
          {
              "name": "312",
              "members": [
                  {
                      "name": "nbd"
                  },
                  {
                      "name": "vhost-user-blk"
                  }
              ],
              "meta-type": "enum",
              "values": [
                  "nbd",
                  "vhost-user-blk"
              ]
          },

Restrict vhost-user-blk in BlockExportType when
CONFIG_VHOST_USER_BLK_SERVER is disabled, so it
doesn't end listed by query-qmp-schema.

Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2: Reword + restrict BlockExportOptions union (armbru)
---
 qapi/block-export.json | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/qapi/block-export.json b/qapi/block-export.json
index c1b92ce1c1c..f9ce79a974b 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' } ] }
 
 ##
@@ -319,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' }
    } }
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/3] block: Minor vhost-user-blk fixes
  2022-01-07 10:54 [PATCH v3 0/3] block: Minor vhost-user-blk fixes Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2022-01-07 10:54 ` [PATCH v3 3/3] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER Philippe Mathieu-Daudé
@ 2022-01-11 15:54 ` Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2022-01-11 15:54 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Eric Blake, qemu-devel, qemu-block, Markus Armbruster

Am 07.01.2022 um 11:54 hat Philippe Mathieu-Daudé geschrieben:
> - Add vhost-user-blk help to qemu-storage-daemon,
> - Do not list vhost-user-blk in BlockExportType when
>   CONFIG_VHOST_USER_BLK_SERVER is disabled.

Thanks, applied to the block branch.

Kevin



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-11 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 10:54 [PATCH v3 0/3] block: Minor vhost-user-blk fixes Philippe Mathieu-Daudé
2022-01-07 10:54 ` [PATCH v3 1/3] docs: Correct 'vhost-user-blk' spelling Philippe Mathieu-Daudé
2022-01-07 10:54 ` [PATCH v3 2/3] qemu-storage-daemon: Add vhost-user-blk help Philippe Mathieu-Daudé
2022-01-07 10:54 ` [PATCH v3 3/3] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER Philippe Mathieu-Daudé
2022-01-11 15:54 ` [PATCH v3 0/3] block: Minor vhost-user-blk fixes Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.