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 <sage@redhat.com>
(cherry picked from commit
2e2ce365866a7569b55aff338a82c132aa927089)
<< " age " << age << dendl;
if (info->last_error)
return info->last_error;
- return std::chrono::duration_cast<std::chrono::milliseconds>(age).count();
+ // return a safe upper bound (we are truncating to ms)
+ return
+ 1 + std::chrono::duration_cast<std::chrono::milliseconds>(age).count();
}
void Objecter::linger_cancel(LingerOp *info)