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

Re: [libvirt] [PATCHv2 2/4] openvz: support file system quota reporting



On 05/11/2012 03:14 PM, Guido Günther wrote:
> ---
>  src/openvz/openvz_conf.c                        |   16 ++++++++++++++++
>  tests/domainschemadata/domain-openvz-simple.xml |    2 ++
>  2 files changed, 18 insertions(+)
> 

>  
> +    param = "DISKSPACE";
> +    ret = openvzReadVPSConfigParam(veid, param, &temp);
> +    if (ret > 0) {
> +        if (openvzParseBarrierLimit(temp, &barrier, &limit)) {
> +            openvzError(VIR_ERR_INTERNAL_ERROR,
> +                        _("Could not read '%s' from config for container %d"),
> +                        param, veid);
> +            goto error;
> +        } else {
> +            fs->space_soft_limit = barrier * 1024; /* unit is bytes */
> +            fs->space_hard_limit = limit * 1024;   /* unit is bytes */

Is there any risk of this overflowing if there is an invalid config file?

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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