On 10/29/2010 04:34 AM, Daniel P. Berrange wrote: > On Fri, Oct 29, 2010 at 05:32:16PM +0800, Lai Jiangshan wrote: >> When wen mount any cgroup without "-o devices", we will fail to start vms: >> >> # virsh start vm1 >> error: Failed to start domain vm1 >> error: Unable to deny all devices for vm1: No such file or directory >> >> When wen mount any cgroup without "-o cpu", we will fail to get schedinfo: >> # virsh schedinfo vm1 >> Scheduler : posix >> error: unable to get cpu shares tunable: No such file or directory >> >> We should only use the cgroup controllers which are mounted on host. >> So I add virCgroupMounted() for qemuCgroupControllerActive() >> >> +bool virCgroupMounted(virCgroupPtr cgroup, int controller) >> +{ >> + return !!cgroup->controllers[controller].mountPoint; >> +} > > IMHO its slightly clearer to read with mountPoint != NULL, rather than !! > > > ACK aside from that minor point. Pushed, after rebasing onto 0.8.5, fixing that nit, and also fixing 'make syntax-check' failure (that line also had a TAB). -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list