From: Sage Weil Date: Fri, 6 May 2016 13:09:43 +0000 (-0400) Subject: osdc/Objecter: upper bound watch_check result X-Git-Tag: v0.94.8~27^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=410ff1528caafaec0cfd9ea6ee4b86ed6788b09d;p=ceph.git osdc/Objecter: upper bound watch_check result This way we always return a safe upper bound on the amount of time since we did a check. Among other things, this prevents us from returning a value of 0, which is confusing. Fixes: http://tracker.ceph.com/issues/15760 Signed-off-by: Sage Weil (cherry picked from commit 2e2ce365866a7569b55aff338a82c132aa927089) Conflicts: src/osdc/Objecter.cc By https://github.com/ceph/ceph/pull/8967, simply add 1 to return vaule. --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 9bdbe5aafa96d..95700eb109bc3 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -629,7 +629,8 @@ int Objecter::linger_check(LingerOp *info) << " age " << age << dendl; if (info->last_error) return info->last_error; - return age.to_msec(); + // return a safe upper bound (we are truncating to ms) + return 1 + age.to_msec(); } void Objecter::linger_cancel(LingerOp *info)