Re: [PATCHv2 3/3] qemu: command: Handle RBD storage pools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/02/13 22:36, Adam Walters wrote:
> This patch modifies the switch statement in qemuBuildVolumeString
> to format and pass the needed argument to handle a volume from an
> RBD storage pool properly. If the volume is a VIR_STORAGE_VOL_NETWORK
> but is not from an RBD pool, I goto cleanup, just like the other
> unimplemented volume types. Currently, the code only supports RBD
> volumes, as I lack the facilities to test other network storage pools.
> Once I have the ability to test those, I will revisit the possibility
> of implementing additional types.
> ---
>  src/qemu/qemu_command.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 763417f..4102568 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3825,6 +3825,17 @@ qemuBuildVolumeString(virConnectPtr conn,
>          }
>          break;
>      case VIR_STORAGE_VOL_NETWORK:
> +        if (disk->srcpool->pooltype == VIR_STORAGE_POOL_RBD) {
> +            virBufferAddLit(opt, "file=");
> +
> +            if (qemuBuildRBDString(conn, disk, opt) < 0)
> +                goto cleanup;
> +
> +            virBufferAddChar(opt, ',');
> +        } else {
> +            goto cleanup;
> +        }
> +        break;
>      case VIR_STORAGE_VOL_NETDIR:
>      case VIR_STORAGE_VOL_LAST:
>          /* Keep the compiler quiet, qemuTranslateDiskSourcePool already
> 

I'm about to push patch [1] that will kill the whole
qemuBuildVolumeString function. You will need to adapt your patch to do
the usefull stuff in qemuTranslateDiskSourcePool present in
src/qemu/qemu_conf.c

Sorry for the inconvenience.

Peter

[1]:
http://www.redhat.com/archives/libvir-list/2013-December/msg00064.html

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]