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

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

 



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@xxxxxxxxxx    +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]