[libvirt] [PATCHv2 3/4] openvz: add quota argument when creating container

Eric Blake eblake at redhat.com
Tue May 22 14:54:30 UTC 2012


On 05/11/2012 03:14 PM, Guido Günther wrote:
> ---
>  src/openvz/openvz_driver.c |   54 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 53 insertions(+), 1 deletion(-)

> +    if (fss->type == VIR_DOMAIN_FS_TYPE_TEMPLATE) {
> +        if (fss->space_soft_limit) {
> +            sl = VIR_DIV_UP(fss->space_soft_limit, 1024);
> +            virCommandAddArg(cmd, "--diskspace");
> +
> +            if (fss->space_hard_limit) {
> +                hl = VIR_DIV_UP(fss->space_hard_limit, 1024);
> +                virCommandAddArgFormat(cmd, "%lld:%lld", sl, hl);
> +            } else {
> +                virCommandAddArgFormat(cmd, "%lld", sl);
> +            }
> +        }

What happens if I provide a hard limit but no soft limit?  I don't see
that in the generated command line.  Wouldn't it be "%lld:%lld",hl,hl?

Everything else looks reasonable.

-- 
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/488f14dc/attachment-0001.sig>


More information about the libvir-list mailing list