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

Eric Blake eblake at redhat.com
Tue May 22 14:48:35 UTC 2012


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 at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list