[libvirt] [PATCHv8 1/2] qemu: conf Implement domain RBD storage pool support

Ján Tomko jtomko at redhat.com
Wed Mar 5 13:58:39 UTC 2014


The subject would IMO be better as:
qemu: support RBD storage pools in 'volume' type disks

On 03/03/2014 05:43 PM, Adam Walters wrote:
> This patch adds a helper function, qemuAddRBDPoolSourceHost, and
> implements the usage of this function to allow RBD storage pools in QEMU
> domain XML.
> 
> The new function grabs RBD monitor hosts from the storage pool
> definition and applies them to the domain's disk definition at runtime.
> This function is used by my modifications to qemuTranslateDiskSourcePool
> similar to the function used by the iSCSI code.
> 
> My modifications to qemuTranslateDiskSourcePool is based heavily on the
> existing iSCSI code, but modified to support RBD install. It will place
> all relevant information into the domain's disk definition at runtime to
> allow access to a RBD storage pool.
> 
> Signed-off-by: Adam Walters <adam at pandorasboxen.com>
> ---
>  src/qemu/qemu_conf.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 61 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 2c397b0..629ac62 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -1251,6 +1251,45 @@ cleanup:
>  }
>  
>  static int
> +qemuAddRBDPoolSourceHost(virDomainDiskDefPtr def,
> +                         virStoragePoolDefPtr pooldef)
> +{
> +    int ret = -1;
> +    size_t i = 0;
> +    char **tokens = NULL;

Unused variable.

The rest looks good to me.

Jan

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


More information about the libvir-list mailing list