From: Ronen Friedman Date: Sat, 26 Apr 2025 08:21:29 +0000 (-0500) Subject: osd/scrub: always round up reported scrub duration X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dc8ab4f43b9bbadf8a5d121a3003533b508ad9b2;p=ceph.git osd/scrub: always round up reported scrub duration as expected by some tests, and clearer for the user. Fixes: https://tracker.ceph.com/issues/68833 Signed-off-by: Ronen Friedman (cherry picked from commit b7fca3676eec20371e0735650a91add065f8faa0) --- diff --git a/src/osd/scrubber/scrub_machine.cc b/src/osd/scrubber/scrub_machine.cc index 07ce5c54cec82..28cba5bd4cb5b 100644 --- a/src/osd/scrubber/scrub_machine.cc +++ b/src/osd/scrubber/scrub_machine.cc @@ -237,9 +237,7 @@ std::optional Session::get_reservation_status() const s.m_osd_to_respond = req ? req->osd : 0; s.m_ordinal_of_requested_replica = m_reservations->active_requests_cnt(); s.m_num_to_reserve = scrbr->get_pg()->get_actingset().size() - 1; - s.m_duration_seconds = - duration_cast(context().get_time_scrubbing()) - .count(); + s.m_duration_seconds = ceil(machine.get_time_scrubbing()).count(); return s; }