Re: [PATCH] qemu: check backing chains even when cgroup is omitted

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

 



On Wed, Feb 20, 2013 at 03:38:36PM -0700, Eric Blake wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=896685 points out
> a regression caused by commit 38c4a9c - libvirt only labels
> the backing chain if the backing chain cache is populated, but
> the code to populate the cache was only conditionally performed
> if cgroup labeling was necessary.
> 
> * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Hoist cache setup...
> * src/qemu/qemu_process.c (qemuProcessStart): ...earlier into
> caller, where it is now unconditional.
> ---
>  src/qemu/qemu_cgroup.c  | 4 +---
>  src/qemu/qemu_process.c | 5 +++++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
> index 4fde1af..e65b486 100644
> --- a/src/qemu/qemu_cgroup.c
> +++ b/src/qemu/qemu_cgroup.c
> @@ -234,9 +234,7 @@ int qemuSetupCgroup(virQEMUDriverPtr driver,
>          }
> 
>          for (i = 0; i < vm->def->ndisks ; i++) {
> -            if (qemuDomainDetermineDiskChain(driver, vm->def->disks[i],
> -                                             false) < 0 ||
> -                qemuSetupDiskCgroup(vm, cgroup, vm->def->disks[i]) < 0)
> +            if (qemuSetupDiskCgroup(vm, cgroup, vm->def->disks[i]) < 0)
>                  goto cleanup;
>          }
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 476e3ed..af8222b 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -3706,6 +3706,11 @@ int qemuProcessStart(virConnectPtr conn,
>          goto cleanup;
> 
>      VIR_DEBUG("Checking for CDROM and floppy presence");
> +    for (i = 0; i < vm->def->ndisks ; i++) {
> +        if (qemuDomainDetermineDiskChain(driver, vm->def->disks[i],
> +                                         false) < 0)
> +            goto cleanup;
> +    }
>      if (qemuDomainCheckDiskPresence(driver, vm,
>                                      flags & VIR_QEMU_PROCESS_START_COLD) < 0)
>          goto cleanup;

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]