]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/ceph_time: tolerate mono time going backwards 34542/head
authorSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 16:09:06 +0000 (10:09 -0600)
committerNathan Cutler <ncutler@suse.com>
Wed, 15 Apr 2020 20:43:11 +0000 (22:43 +0200)
commit8026f1f3d0405db8323ab16b97a74dc5c4b2cbe6
tree85ee1f6bec372cd09ff0e5ea9acdc5e47702033e
parentc62d4d91c15bd550c7c368feb550507e2b38fe38
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>
(cherry picked from commit cd00378720459d92394697e2cb8086f30c220312)
src/common/ceph_time.h