From: Daniel P. Berrange Date: Wed, 28 Apr 2010 15:25:42 +0000 (+0100) Subject: Fix handling of disk backing stores with cgroups X-Git-Tag: v0.8.2~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e596dbb32a4032e0510a22af5907b808e4820439;p=thirdparty%2Flibvirt.git Fix handling of disk backing stores with cgroups 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1a510693d3..af63a5d813 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -8348,6 +8348,7 @@ static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver, ret = 0; cleanup: + virCgroupFree(&cgroup); return ret; }