]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pacific: osd/scrub: Reintroduce scrub starts message 48070/head
authorPrashant D <pdhange@redhat.com>
Tue, 13 Sep 2022 15:04:02 +0000 (11:04 -0400)
committerPrashant D <pdhange@redhat.com>
Tue, 13 Sep 2022 15:04:02 +0000 (11:04 -0400)
Whenever the scrubbing process starts for a PG, We used to log
scrub/deep-scrub "starts" message in the cluster log. We are
not seeing scrub "starts" messages anymore. Reintroduce scrub
starts message in order to calculate exact time taken to
scrub/deep-scrub the PG. Backporting of PR#46438 to pacific
is non-trivial hence this PR is specific to pacific release
to introduce scrub "starts" message.

Signed-off-by: Prashant D <pdhange@redhat.com>
src/osd/pg_scrubber.cc
src/osd/pg_scrubber.h
src/osd/scrub_machine.cc
src/osd/scrub_machine_lstnr.h

index a686d8a4c4a261d449bad0d88726355b39d018bd..fd7825cc65917e718d2d5dd9320834c22dcbfc0c 100644 (file)
@@ -1930,6 +1930,14 @@ PgScrubber::PgScrubber(PG* pg)
   m_fsm->initiate();
 }
 
+void PgScrubber::scrub_begin()
+{
+  stringstream ss;
+  ss << m_pg->info.pgid.pgid << " " << m_mode_desc << " starts";
+  dout(2) << ss.str() << dendl;
+  m_osds->clog->debug(ss);
+}
+
 void PgScrubber::reserve_replicas()
 {
   dout(10) << __func__ << dendl;
index 0406544fbed4ba2f41050934ecc0ea0ced1c6299..392a4a588026f6810fceb95702d8fb797ae1bcba 100644 (file)
@@ -375,6 +375,8 @@ class PgScrubber : public ScrubPgIF, public ScrubMachineListener {
 
   void on_digest_updates() final;
 
+  void scrub_begin() final;
+
   void scrub_finish() final;
 
   ScrubMachineListener::MsgAndEpoch
index 1d08af5812796b32dda9f744c7af823887a19823..fff3720817e74a04294c8d40d15729b5afccf794 100644 (file)
@@ -103,6 +103,7 @@ ReservingReplicas::ReservingReplicas(my_context ctx) : my_base(ctx)
 {
   dout(10) << "-- state -->> ReservingReplicas" << dendl;
   DECLARE_LOCALS;  // 'scrbr' & 'pg_id' aliases
+  scrbr->scrub_begin();
   scrbr->reserve_replicas();
 }
 
index 564fa77a1f062bd47e80f18fd5a9dc211e210783..8d9622b9bde88e31b6051cfdf0839dd3a0c08620 100644 (file)
@@ -89,6 +89,8 @@ struct ScrubMachineListener {
 
   virtual void on_digest_updates() = 0;
 
+  virtual void scrub_begin() = 0;
+
   /// the part that actually finalizes a scrub
   virtual void scrub_finish() = 0;