[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [for-2.9 8/8] sheepdog: Fix blockdev-add
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [for-2.9 8/8] sheepdog: Fix blockdev-add |
Date: |
Wed, 29 Mar 2017 21:59:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 29.03.2017 18:45, Markus Armbruster wrote:
> Commit 831acdc "sheepdog: Implement bdrv_parse_filename()" and commit
> d282f34 "sheepdog: Support blockdev-add" have different ideas on how
> the QemuOpts parameters for the server address are named. Fix that.
> While there, rename BlockdevOptionsSheepdog member addr to server, for
> consistency with BlockdevOptionsSsh, BlockdevOptionsGluster,
> BlockdevOptionsNbd.
>
> Commit 831acdc's example becomes
>
> --drive driver=sheepdog,server.host=fido,vdi=dolly
>
> instead of
>
> --drive driver=sheepdog,host=fido,vdi=dolly
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> block/sheepdog.c | 18 +++++++++---------
> qapi/block-core.json | 4 ++--
> 2 files changed, 11 insertions(+), 11 deletions(-)
OK, so let me get this straight: Before this patch, @addr was advertised
as a runtime parameter that actually wasn't supported at all? (Because I
can't see any place in block/sheepdog.c where it would be parsed.)
This patch now renames @addr to @server and instead of actually parsing
the option, it just removes the so-far convenience[1] options @host,
@port, and @path and just fetches the from @server?
If that is true, I can't say I like it the least. I guess it works for
2.9, but there should be a FIXME somewhere in this patch.
Also, if you set any of server.* in bdrv_parse_filename(), you also have
to set server.type. It's a SocketAddressFlat, .type is a required field.
I know it's just for internal use, but that doesn't change the fact that
it's an invalid SocketAddressFlat object without.
Max
[1] Originally there were apparently introduced for
bdrv_parse_filename() -- but of course you can just use them in -drive
directly...
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [for-2.9 5/8] gluster: Prepare for SocketAddressFlat extension, (continued)
[Qemu-block] [for-2.9 2/8] char: Fix socket with "type": "vsock" address, Markus Armbruster, 2017/03/29
Re: [Qemu-block] [for-2.9 2/8] char: Fix socket with "type": "vsock" address, Stefan Hajnoczi, 2017/03/29
Re: [Qemu-block] [for-2.9 2/8] char: Fix socket with "type": "vsock" address, Max Reitz, 2017/03/29
[Qemu-block] [for-2.9 4/8] block: Document -drive problematic code and bugs, Markus Armbruster, 2017/03/29