[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 09/13] block/gluster: Use URI parsing code from glib
From: |
Eric Blake |
Subject: |
Re: [PATCH v3 09/13] block/gluster: Use URI parsing code from glib |
Date: |
Fri, 19 Apr 2024 08:10:25 -0500 |
User-agent: |
NeoMutt/20240201 |
On Thu, Apr 18, 2024 at 12:10:52PM +0200, Thomas Huth wrote:
> Since version 2.66, glib has useful URI parsing functions, too.
> Use those instead of the QEMU-internal ones to be finally able
> to get rid of the latter.
>
> Since g_uri_get_path() returns a const pointer, we also need to
> tweak the parameter of parse_volume_options() (where we use the
> result of g_uri_get_path() as input).
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> block/gluster.c | 71 ++++++++++++++++++++++++-------------------------
> 1 file changed, 35 insertions(+), 36 deletions(-)
>
> @@ -364,57 +363,57 @@ static int
> qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf,
> QAPI_LIST_PREPEND(gconf->server, gsconf);
>
> /* transport */
> - if (!uri->scheme || !strcmp(uri->scheme, "gluster")) {
> + uri_scheme = g_uri_get_scheme(uri);
> + if (!uri_scheme || !strcmp(uri_scheme, "gluster")) {
> gsconf->type = SOCKET_ADDRESS_TYPE_INET;
It may be worth a mention in the commit message that we are aware that
this provides a positive user-visible change as a side-effect: namely,
by virtue of using glib's parser (which normalizes the scheme to
lowercase) instead of our own (which did not), we now accept
GLUSTER:// URIs in addition to the usual gluster:// spelling. Similar
comments to all the other affected patches in the series.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
- Re: [PATCH v3 01/13] tests: Remove Ubuntu 20.04 container, (continued)
- [PATCH v3 02/13] tests/lcitool/libvirt-ci: Update to the latest master branch, Thomas Huth, 2024/04/18
- [PATCH v3 03/13] tests/docker/dockerfiles: Run lcitool-refresh after the lcitool update, Thomas Huth, 2024/04/18
- [PATCH v3 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8, Thomas Huth, 2024/04/18
- [PATCH v3 05/13] .travis.yml: Update the jobs to Ubuntu 22.04, Thomas Huth, 2024/04/18
- [PATCH v3 06/13] ci: move external build environment setups to CentOS Stream 9, Thomas Huth, 2024/04/18
- [PATCH v3 08/13] Remove glib compatibility code that is not required anymore, Thomas Huth, 2024/04/18
- [PATCH v3 07/13] Bump minimum glib version to v2.66, Thomas Huth, 2024/04/18
- [PATCH v3 09/13] block/gluster: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- Re: [PATCH v3 09/13] block/gluster: Use URI parsing code from glib,
Eric Blake <=
- [PATCH v3 10/13] block/nbd: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 11/13] block/nfs: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 12/13] block/ssh: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 13/13] util/uri: Remove the old URI parsing code, Thomas Huth, 2024/04/18