]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: Reintroduce scrub starts message 46438/head
authorPrashant D <pdhange@redhat.com>
Tue, 31 May 2022 05:07:47 +0000 (06:07 +0100)
committerPrashant D <pdhange@redhat.com>
Tue, 7 Jun 2022 12:27:35 +0000 (13:27 +0100)
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.

Fixes: https://tracker.ceph.com/issues/55798
Signed-off-by: Prashant D <pdhange@redhat.com>
src/osd/osd_types_fmt.h
src/osd/scrubber/pg_scrubber.cc

index 58a634f70ca7d6379f85cdca272346865a3c7b90..cb54572c8e247e7820044cad83600893e91e1e52 100644 (file)
@@ -114,7 +114,7 @@ struct fmt::formatter<pg_t> {
   template <typename FormatContext>
   auto format(const pg_t& pg, FormatContext& ctx)
   {
-    return fmt::format_to(ctx.out(), "{}.{}", pg.pool(), pg.m_seed);
+    return fmt::format_to(ctx.out(), "{}.{:x}", pg.pool(), pg.m_seed);
   }
 };
 
index f424d3e52d60bd848d724a37fb2bd2bb92e2f675..bcf74d0e439822f08b887e02de88b1ea53e0dc7a 100644 (file)
@@ -2145,6 +2145,10 @@ PgScrubber::PgScrubber(PG* pg)
 void PgScrubber::set_scrub_begin_time()
 {
   scrub_begin_stamp = ceph_clock_now();
+  m_osds->clog->debug() << fmt::format(
+    "{} {} starts",
+    m_pg->info.pgid.pgid,
+    m_mode_desc);
 }
 
 void PgScrubber::set_scrub_duration()