From: Sage Weil Date: Fri, 6 May 2016 13:09:43 +0000 (-0400) Subject: osdc/Objecter: upper bound watch_check result X-Git-Tag: v10.2.2~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9104%2Fhead;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) --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index c1f4e91c130..2f028cf3e73 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -706,7 +706,9 @@ int Objecter::linger_check(LingerOp *info) << " age " << age << dendl; if (info->last_error) return info->last_error; - return std::chrono::duration_cast(age).count(); + // return a safe upper bound (we are truncating to ms) + return + 1 + std::chrono::duration_cast(age).count(); } void Objecter::linger_cancel(LingerOp *info)