[libvirt] [PATCH 12/12] storage: rbd: Implement support for passing config file option

Peter Krempa pkrempa at redhat.com
Fri Nov 21 13:30:46 UTC 2014


On 11/20/14 16:17, John Ferlan wrote:
> 
> 
> On 11/12/2014 08:47 AM, Peter Krempa wrote:
>> To be able to express some use cases of the RBD backing with libvirt, we
>> need to be able to specify a config file for the RBD client to qemu as
>> that is one of the commonly used options.
>> ---
>>  docs/formatdomain.html.in                              |  8 ++++++++
>>  docs/schemas/domaincommon.rng                          |  8 ++++++++
>>  src/conf/domain_conf.c                                 | 18 ++++++++++++++++--
>>  src/qemu/qemu_command.c                                |  3 +++
>>  src/util/virstoragefile.c                              |  5 +++++
>>  src/util/virstoragefile.h                              |  2 ++
>>  .../qemuxml2argv-disk-drive-network-rbd.args           |  2 ++
>>  .../qemuxml2argv-disk-drive-network-rbd.xml            |  8 ++++++++
>>  8 files changed, 52 insertions(+), 2 deletions(-)
>>

>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>> index 37a8042..a9a26a4 100644
>> --- a/src/conf/domain_conf.c
>> +++ b/src/conf/domain_conf.c


>> @@ -16205,6 +16216,9 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
>>                  virBufferEscapeString(buf, "<snapshot name='%s'/>\n",
>>                                        src->snapshot);
>>
> 
>     if (src->configfile)

virBufferEscapeString automagically doesn't do anything if the third
argument is NULL. The design is to avoid the need to wrap the calls by
if in the XML formatter :)

> 
> Rest is fine, ACK
> 
> John
> 
>> +                virBufferEscapeString(buf, "<config file='%s'/>\n",
>> +                                      src->configFile);
>> +
>>                  virBufferAdjustIndent(buf, -2);
>>                  virBufferAddLit(buf, "</source>\n");
>>              }
>

Thanks.

Peter

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


More information about the libvir-list mailing list