]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/ceph_time: tolerate mono time going backwards
authorSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 16:09:06 +0000 (10:09 -0600)
committerSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 16:09:06 +0000 (10:09 -0600)
commitcd00378720459d92394697e2cb8086f30c220312
tree239a809a09102dd4f1685adc93182920bb1f1e5a
parent453d611eb300ee9796f3ece5997f499d89fea289
common/ceph_time: tolerate mono time going backwards

Some kernels (and possibly some hardware?) can trigger a monotonic clock
that goes back in time.  That, in turn, can lead to a negative monotonic
time span.  This would trigger an assert.

This this problem seems to be widespread, tolerate the case and interpret
it as a 0-length interval (vs something negative).

Fixes: https://tracker.ceph.com/issues/44078
Fixes: https://tracker.ceph.com/issues/43365
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/ceph_time.h