2bc292
From 0f4592f79f8c24f84db18a8c39c6056b2a0be524 Mon Sep 17 00:00:00 2001
2bc292
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
2bc292
Date: Fri, 7 Jan 2022 11:54:19 +0100
2bc292
Subject: [PATCH 1/5] qemu-storage-daemon: Add vhost-user-blk help
2bc292
MIME-Version: 1.0
2bc292
Content-Type: text/plain; charset=UTF-8
2bc292
Content-Transfer-Encoding: 8bit
2bc292
2bc292
RH-Author: Kevin Wolf <kwolf@redhat.com>
2bc292
RH-MergeRequest: 63: qemu-storage-daemon: Add vhost-user-blk help
2bc292
RH-Commit: [1/2] 6b08fec5d6ceea9f8f3810321099310069e08b53 (kmwolf/centos-qemu-kvm)
2bc292
RH-Bugzilla: 1962088
2bc292
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
2bc292
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2bc292
RH-Acked-by: Hanna Reitz <hreitz@redhat.com>
2bc292
2bc292
Add missing vhost-user-blk help:
2bc292
2bc292
  $ qemu-storage-daemon -h
2bc292
  ...
2bc292
    --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,
2bc292
             addr.type=unix,addr.path=<socket-path>[,writable=on|off]
2bc292
             [,logical-block-size=<block-size>][,num-queues=<num-queues>]
2bc292
                           export the specified block node as a
2bc292
                           vhosts-user-blk device over UNIX domain socket
2bc292
    --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,
2bc292
             fd,addr.str=<fd>[,writable=on|off]
2bc292
             [,logical-block-size=<block-size>][,num-queues=<num-queues>]
2bc292
                           export the specified block node as a
2bc292
                           vhosts-user-blk device over file descriptor
2bc292
  ...
2bc292
2bc292
Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API")
2bc292
Reported-by: Qing Wang <qinwang@redhat.com>
2bc292
Reviewed-by: Eric Blake <eblake@redhat.com>
2bc292
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2bc292
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2bc292
Message-Id: <20220107105420.395011-3-f4bug@amsat.org>
2bc292
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2bc292
(cherry picked from commit c8cbc9524269d9583749aaaea8aa244add7e1900)
2bc292
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2bc292
---
2bc292
 storage-daemon/qemu-storage-daemon.c | 13 +++++++++++++
2bc292
 1 file changed, 13 insertions(+)
2bc292
2bc292
diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-storage-daemon.c
2bc292
index 52cf17e8ac..9d76d1114d 100644
2bc292
--- a/storage-daemon/qemu-storage-daemon.c
2bc292
+++ b/storage-daemon/qemu-storage-daemon.c
2bc292
@@ -104,6 +104,19 @@ static void help(void)
2bc292
 "                         export the specified block node over FUSE\n"
2bc292
 "\n"
2bc292
 #endif /* CONFIG_FUSE */
2bc292
+#ifdef CONFIG_VHOST_USER_BLK_SERVER
2bc292
+"  --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,\n"
2bc292
+"           addr.type=unix,addr.path=<socket-path>[,writable=on|off]\n"
2bc292
+"           [,logical-block-size=<block-size>][,num-queues=<num-queues>]\n"
2bc292
+"                         export the specified block node as a\n"
2bc292
+"                         vhost-user-blk device over UNIX domain socket\n"
2bc292
+"  --export [type=]vhost-user-blk,id=<id>,node-name=<node-name>,\n"
2bc292
+"           fd,addr.str=<fd>[,writable=on|off]\n"
2bc292
+"           [,logical-block-size=<block-size>][,num-queues=<num-queues>]\n"
2bc292
+"                         export the specified block node as a\n"
2bc292
+"                         vhost-user-blk device over file descriptor\n"
2bc292
+"\n"
2bc292
+#endif /* CONFIG_VHOST_USER_BLK_SERVER */
2bc292
 "  --monitor [chardev=]name[,mode=control][,pretty[=on|off]]\n"
2bc292
 "                         configure a QMP monitor\n"
2bc292
 "\n"
2bc292
-- 
2bc292
2.27.0
2bc292