Re: [PATCH 2/3] Ensure all cgroup partitions have a suffix of ".partition"

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

 



On 04/26/2013 04:45 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> If the partition named passed in the XML does not already have
> a suffix, ensure it gets a '.partition' added to each component.
> The exceptions are /machine, /user and /system which do not need
> to have a suffix, since they are fixed partitions at the top
> level.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/util/vircgroup.c  |  57 +++++++++++++++++++++--
>  tests/vircgrouptest.c | 123 ++++++++++++++++++++++++++++++++++++--------------
>  2 files changed, 143 insertions(+), 37 deletions(-)
> 

> -    rc = virCgroupNew(path, NULL, controllers, group);
> +    /* XXX convert all cgroups APIs to use error report
> +     * APIs instead of returning errno */
> +    if (!(newpath = virCgroupSetPartitionSuffix(path))) {
> +        virResetLastError();
> +        rc = -ENOMEM;
> +        goto cleanup;
> +    }

Yeah, I can see why you added that comment.  But I looked through all
the code paths, and looks like the only error possible is OOM, so your
conversion of failure back to errno is correct.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
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

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