]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix handling of disk backing stores with cgroups
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 28 Apr 2010 15:25:42 +0000 (16:25 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 25 May 2010 14:57:54 +0000 (10:57 -0400)
The cgroups ACL code was only allowing the primary disk image.
It is possible to chain images together, so we need to search
for backing stores and add them to the ACL too. Since the ACL
only handles block devices, we ignore the EINVAL we get from
plain files. In addition it was missing code to teardown the
cgroup when hot-unplugging a disk

* src/qemu/qemu_driver.c: Allow backing stores in cgroup ACLs
  and add missing teardown code in unplug path

src/qemu/qemu_driver.c

index 1a510693d3b0fb1fed3b94ec357fed2ca8966b88..af63a5d81396af7346926d1fec4599e20698fe21 100644 (file)
@@ -8348,6 +8348,7 @@ static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
     ret = 0;
 
 cleanup:
+    virCgroupFree(&cgroup);
     return ret;
 }