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