[libvirt] [PATCH 4/9] virstoragefile: Always use virStorageSourceSetBackingStore to set backing store

Michal Privoznik mprivozn at redhat.com
Tue Jan 13 14:46:02 UTC 2015


On 08.12.2014 19:31, Matthias Gatto wrote:
> Replace the parts of the code where a backing store is set manually
> with virStorageSourceSetBackingStore
>
> Signed-off-by: Matthias Gatto <matthias.gatto at outscale.com>
> ---
>   src/conf/domain_conf.c           | 2 +-
>   src/qemu/qemu_domain.c           | 1 -
>   src/qemu/qemu_driver.c           | 4 ++--
>   src/storage/storage_backend_fs.c | 2 +-
>   src/storage/storage_driver.c     | 2 +-
>   src/util/virstoragefile.c        | 8 +++++---
>   tests/virstoragetest.c           | 4 ++--
>   7 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index b790fc5..00e0470 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -5523,7 +5523,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
>           virDomainDiskBackingStoreParse(ctxt, backingStore) < 0)
>           goto cleanup;
>
> -    src->backingStore = backingStore;
> +    virStorageSourceSetBackingStore(src, backingStore, 0);
>       ret = 0;
>
>    cleanup:
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 9157e4d..458ceb0 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -2534,7 +2534,6 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
>       int ret = -1;
>       size_t i;
>
> -    VIR_DEBUG("Checking for disk presence");

This is rather unrelated.

>       for (i = vm->def->ndisks; i > 0; i--) {
>           size_t idx = i - 1;
>           virDomainDiskDefPtr disk = vm->def->disks[idx];

Michal




More information about the libvir-list mailing list