]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds/quiesce: prevent an overflow of the wait duration 56668/head
authorLeonid Usov <leonid.usov@ibm.com>
Thu, 28 Mar 2024 05:32:26 +0000 (01:32 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 3 Apr 2024 13:46:04 +0000 (09:46 -0400)
commit992b8e805c65b0272a62870e33da609c39196d24
tree625ffe59fb5c5f68d959d0e7f5f6e776a45bab87
parent7b91902e432269afefe61e3c2c416bf50aaf295a
mds/quiesce: prevent an overflow of the wait duration

QuiesceTimeInterval::max() may overflow inside of a call to
std::condition_variable::wait_for and result in a busy-loop,
making the call to timeout immediately

The solution is to cap the wait duration to a value which can
certainly fit in whichever clock std library is using internally.

Fixes: https://tracker.ceph.com/issues/65276
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit 508e870ee383265b8489e18a4c73854616a4110a)
src/mds/QuiesceDbManager.cc