[libvirt] [PATCH RFC 05/27] storage: gluster: Properly fix missing slashes in volume paths

Eric Blake eblake at redhat.com
Thu Dec 19 04:25:55 UTC 2013


On 12/16/2013 09:32 AM, Peter Krempa wrote:
> Add a slash to the volume key so that the URI that is generated from it
> will be formated properly. The extra slash doesn't hurt in the 'key'
> attribute as we just need it to be unique.
> ---
>  src/storage/storage_backend_gluster.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
> index 1be9034..36e99e9 100644
> --- a/src/storage/storage_backend_gluster.c
> +++ b/src/storage/storage_backend_gluster.c
> @@ -222,7 +222,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state,
> 
>      if (VIR_STRDUP(vol->name, name) < 0)
>          goto cleanup;
> -    if (virAsprintf(&vol->key, "%s%s%s", state->volname, state->dir,
> +    if (virAsprintf(&vol->key, "/%s%s%s", state->volname, state->dir,

This does not match the documentation.  I'd rather fix the problem with
the URI generation (in patch 4/27) and leave the key unchanged, if only
because we already released 1.2.0 with documentation that the key does
not have a leading slash.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131218/25d5efa9/attachment-0001.sig>


More information about the libvir-list mailing list