
On Wed, May 23, 2012 at 01:58:30PM -0600, Eric Blake wrote:
On 05/23/2012 09:10 AM, Guido Günther wrote:
--- src/openvz/openvz_driver.c | 58 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-)
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index c6d25d7..fb72cde 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -189,6 +189,48 @@ cleanup: }
+ } else if (fss->space_soft_limit) { + openvzError(VIR_ERR_INVALID_ARG, "%s", + _("Can't set soft limit without hard limit")); + goto cleanup;
This gives a reasonable error message, so I'm okay ack'ing without change. Should we maybe consider setting hard_limit = soft_limit instead of erroring out, or is that too much magic?
I was unsure here either and went for rejecting this instead since setting a soft limit but no hard limit could also be read as: I'm allowed to take as much space as I want for the grace period and fall back to soft_limit afterwards. Cheers, -- Guido