Re: [PATCH v2 1/2] qemu-storage-daemon: Add vhost-user-blk help

2022-01-07 Thread Philippe Mathieu-Daudé
On 1/6/22 23:15, Eric Blake wrote:
> On Thu, Dec 23, 2021 at 11:14:25AM +0100, Philippe Mathieu-Daudé wrote:
>> Add missing vhost-user-blk help:
>>
>>   $ qemu-storage-daemon -h
>>   ...
>> --export [type=]vhost-user-blk,id=,node-name=,
>>  addr.type=unix,addr.path=[,writable=on|off]
>>  [,logical-block-size=][,num-queues=]
>>export the specified block node as a
>>vhosts-user-blk device over UNIX domain socket
> 
> Why 'vhosts-' here instead of 'vhost'?

Oops, I copy/pasted from qemu-storage-daemon.rst.

>> --export [type=]vhost-user-blk,id=,node-name=,
>>  fd,addr.str=[,writable=on|off]
>>  [,logical-block-size=][,num-queues=]
>>export the specified block node as a
>>vhosts-user-blk device over file descriptor
> 
> here too.
> 
>>   ...
>>
>> Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API")
>> Reported-by: Qing Wang 
>> Signed-off-by: Philippe Mathieu-Daudé 
>> ---
>>  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..0c19e128e3f 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=,node-name=,\n"
>> +"   addr.type=unix,addr.path=[,writable=on|off]\n"
>> +"   [,logical-block-size=][,num-queues=]\n"
>> +" export the specified block node as a\n"
>> +" vhosts-user-blk device over UNIX domain socket\n"
> 
> This...
> 
>> +"  --export [type=]vhost-user-blk,id=,node-name=,\n"
>> +"   fd,addr.str=[,writable=on|off]\n"
>> +"   [,logical-block-size=][,num-queues=]\n"
>> +" export the specified block node as a\n"
>> +" vhosts-user-blk device over file descriptor\n"
> 
> ...and this line would need the same tweak.
> 
> If you agree that it's a typo, then let's fix it, and you can have
> 
> Reviewed-by: Eric Blake 

Yes (I will also update qemu-storage-daemon.rst). Thank you!

Phil.



Re: [PATCH v2 1/2] qemu-storage-daemon: Add vhost-user-blk help

2022-01-06 Thread Eric Blake
On Thu, Dec 23, 2021 at 11:14:25AM +0100, Philippe Mathieu-Daudé wrote:
> Add missing vhost-user-blk help:
> 
>   $ qemu-storage-daemon -h
>   ...
> --export [type=]vhost-user-blk,id=,node-name=,
>  addr.type=unix,addr.path=[,writable=on|off]
>  [,logical-block-size=][,num-queues=]
>export the specified block node as a
>vhosts-user-blk device over UNIX domain socket

Why 'vhosts-' here instead of 'vhost'?

> --export [type=]vhost-user-blk,id=,node-name=,
>  fd,addr.str=[,writable=on|off]
>  [,logical-block-size=][,num-queues=]
>export the specified block node as a
>vhosts-user-blk device over file descriptor

here too.

>   ...
> 
> Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API")
> Reported-by: Qing Wang 
> Signed-off-by: Philippe Mathieu-Daudé 
> ---
>  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..0c19e128e3f 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=,node-name=,\n"
> +"   addr.type=unix,addr.path=[,writable=on|off]\n"
> +"   [,logical-block-size=][,num-queues=]\n"
> +" export the specified block node as a\n"
> +" vhosts-user-blk device over UNIX domain socket\n"

This...

> +"  --export [type=]vhost-user-blk,id=,node-name=,\n"
> +"   fd,addr.str=[,writable=on|off]\n"
> +"   [,logical-block-size=][,num-queues=]\n"
> +" export the specified block node as a\n"
> +" vhosts-user-blk device over file descriptor\n"

...and this line would need the same tweak.

If you agree that it's a typo, then let's fix it, and you can have

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




[PATCH v2 1/2] qemu-storage-daemon: Add vhost-user-blk help

2021-12-23 Thread Philippe Mathieu-Daudé
Add missing vhost-user-blk help:

  $ qemu-storage-daemon -h
  ...
--export [type=]vhost-user-blk,id=,node-name=,
 addr.type=unix,addr.path=[,writable=on|off]
 [,logical-block-size=][,num-queues=]
   export the specified block node as a
   vhosts-user-blk device over UNIX domain socket
--export [type=]vhost-user-blk,id=,node-name=,
 fd,addr.str=[,writable=on|off]
 [,logical-block-size=][,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 
Signed-off-by: Philippe Mathieu-Daudé 
---
 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..0c19e128e3f 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=,node-name=,\n"
+"   addr.type=unix,addr.path=[,writable=on|off]\n"
+"   [,logical-block-size=][,num-queues=]\n"
+" export the specified block node as a\n"
+" vhosts-user-blk device over UNIX domain socket\n"
+"  --export [type=]vhost-user-blk,id=,node-name=,\n"
+"   fd,addr.str=[,writable=on|off]\n"
+"   [,logical-block-size=][,num-queues=]\n"
+" export the specified block node as a\n"
+" vhosts-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