Skip to content

Commit dc8ab4f

Browse files
committed
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 <[email protected]> (cherry picked from commit b7fca36)
1 parent 6c01b91 commit dc8ab4f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/osd/scrubber/scrub_machine.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ std::optional<pg_scrubbing_status_t> Session::get_reservation_status() const
237237
s.m_osd_to_respond = req ? req->osd : 0;
238238
s.m_ordinal_of_requested_replica = m_reservations->active_requests_cnt();
239239
s.m_num_to_reserve = scrbr->get_pg()->get_actingset().size() - 1;
240-
s.m_duration_seconds =
241-
duration_cast<seconds>(context<ScrubMachine>().get_time_scrubbing())
242-
.count();
240+
s.m_duration_seconds = ceil<seconds>(machine.get_time_scrubbing()).count();
243241
return s;
244242
}
245243

0 commit comments

Comments
 (0)