[libvirt] [PATCH 3/6] storage: netfs: Support lookup of glusterfs pool sources

Peter Krempa pkrempa at redhat.com
Tue Apr 1 10:00:29 UTC 2014


On 03/28/14 23:57, Ján Tomko wrote:
> On 03/28/2014 11:01 PM, Peter Krempa wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1072714
>>
>> Use the "gluster" command line tool to retrieve information about remote
>> volumes on a gluster server to allow storage pool source lookup.
>>
>> Unfortunately gluster doesn't provide a management library so that we
>> could use that directly, instead the RPC calls are hardcoded in the
>> command line tool.
>> ---
>>  configure.ac                     |  6 +++
>>  src/storage/storage_backend.c    | 86 ++++++++++++++++++++++++++++++++++++++++
>>  src/storage/storage_backend.h    |  4 ++
>>  src/storage/storage_backend_fs.c |  5 +++
>>  4 files changed, 101 insertions(+)
>>
> 
>> diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
>> index 5b3b536..c7e4688 100644
>> --- a/src/storage/storage_backend.c
>> +++ b/src/storage/storage_backend.c
>> @@ -1640,3 +1640,89 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool,
>>
>>      return stablepath;
>>  }
>> +
>> +#ifdef GLUSTER_CLI
>> +int
>> +virStorageBackendFindGlusterPoolSources(const char *host,
>> +                                        int pooltype,
>> +                                        virStoragePoolSourceListPtr list)
>> +{
>> +    char *outbuf = NULL;
>> +    virCommandPtr cmd = NULL;
> 
>> +    xmlDocPtr doc = NULL;
>> +    xmlXPathContextPtr ctxt = NULL;
>> +    xmlNodePtr *nodes = NULL;
> 
> These three are never freed.

I've fixed these leaks and pushed this patch according to Eric's ACK.

> 
> Jan
> 
> 

Peter


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


More information about the libvir-list mailing list