]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: make m_session_started_at at Session state ctor 63758/head
authorRonen Friedman <rfriedma@redhat.com>
Wed, 4 Jun 2025 17:44:16 +0000 (12:44 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Fri, 6 Jun 2025 14:52:19 +0000 (09:52 -0500)
commit38057ce2c14ca9a6b81617399480510fb0eae951
treec57c278972f6fe61dca2541cfa973a56b1183353
parent24bc6462ef7d32b005e14c4a26b83bc014994d5b
osd/scrub: make m_session_started_at at Session state ctor

ScrubMachine::get_time_scrubbing() must access the Session object
to compute the scrub duration. But the State data is not externally
accessible before its ctor has completed.

As we always happen to try to access that data inside the ctor,
this always results in a warning log message.

Here we move m_session_started_at into the outer state, simplifying
the logic required to access it.

Fixes: https://tracker.ceph.com/issues/64955
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/pg_scrubber.cc
src/osd/scrubber/scrub_machine.cc
src/osd/scrubber/scrub_machine.h