From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: mreitz@redhat.com, prasanna.kalever@redhat.com, jcody@redhat.com,
qemu-devel@nongnu.org, Thomas Huth <thuth@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix
Date: Tue, 3 Apr 2018 08:09:49 -0500 [thread overview]
Message-ID: <d1633a50-2aad-af64-081c-bfac72b89e12@redhat.com> (raw)
In-Reply-To: <20180403110810.25624-1-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]
On 04/03/2018 06:08 AM, Kevin Wolf wrote:
> The legacy command line interface gets the socket path from an option
> called 'socket'. QAPI in contract uses SocketAddress, where the
> corresponding option is called 'path'.
>
> Fix the gluster block driver to accept both 'socket' and 'path', with
> 'path' being the preferred syntax.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1545155
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/gluster.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
Should we also add a deprecation warning for 'socket' and update the
deprecation documentation, so we can start the clock ticking on getting
rid of maintaining the back-compat glue forever?
> @@ -615,10 +620,18 @@ static int qemu_gluster_parse_json(BlockdevOptionsGluster *gconf,
> goto out;
> }
>
> - ptr = qemu_opt_get(opts, GLUSTER_OPT_SOCKET);
> + ptr = qemu_opt_get(opts, GLUSTER_OPT_PATH);
> + if (!ptr) {
> + ptr = qemu_opt_get(opts, GLUSTER_OPT_SOCKET);
Here's where we'd warn, if we want to deprecate things.
> + } else if (qemu_opt_get(opts, GLUSTER_OPT_SOCKET)) {
> + error_setg(&local_err,
> + "Conflicting parameters 'path' and 'socket'");
> + error_append_hint(&local_err, GERR_INDEX_HINT, i);
> + goto out;
> + }
> if (!ptr) {
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2018-04-03 13:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 11:08 [Qemu-devel] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix Kevin Wolf
2018-04-03 13:09 ` Eric Blake [this message]
2018-04-04 15:41 ` [Qemu-devel] [Qemu-block] " Peter Krempa
2018-04-04 15:54 ` Kevin Wolf
2018-04-04 18:16 ` Eric Blake
2018-04-04 18:37 ` Kevin Wolf
2018-04-04 18:49 ` Eric Blake
2018-04-03 13:55 ` [Qemu-devel] " Jeff Cody
2018-04-03 13:55 ` Jeff Cody
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=d1633a50-2aad-af64-081c-bfac72b89e12@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=prasanna.kalever@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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).