]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: always round up reported scrub duration 62998/head
authorRonen Friedman <rfriedma@redhat.com>
Sat, 26 Apr 2025 08:21:29 +0000 (03:21 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 27 Apr 2025 12:36:52 +0000 (07:36 -0500)
as expected by some tests, and clearer for the user.

Fixes: https://tracker.ceph.com/issues/68833
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit b7fca3676eec20371e0735650a91add065f8faa0)

src/osd/scrubber/scrub_machine.cc

index 07ce5c54cec82eec27444562f04ca0460ea0b906..28cba5bd4cb5bb8fd53ad87e653e6c28c865cd52 100644 (file)
@@ -237,9 +237,7 @@ std::optional<pg_scrubbing_status_t> 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<seconds>(context<ScrubMachine>().get_time_scrubbing())
-         .count();
+  s.m_duration_seconds = ceil<seconds>(machine.get_time_scrubbing()).count();
   return s;
 }