[libvirt] [PATCH] qemu_driver: add virCgroupMounted

Eric Blake eblake at redhat.com
Fri Oct 29 15:47:23 UTC 2010


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 at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101029/85b1b177/attachment-0001.sig>


More information about the libvir-list mailing list