From: Prashant D Date: Tue, 31 May 2022 05:07:47 +0000 (+0100) Subject: osd/scrub: Reintroduce scrub starts message X-Git-Tag: v18.0.0~694^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2f6272ac8546070cbc78447c558db47dbdff113c;p=ceph.git osd/scrub: Reintroduce scrub starts message 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 --- diff --git a/src/osd/osd_types_fmt.h b/src/osd/osd_types_fmt.h index 58a634f70ca7..cb54572c8e24 100644 --- a/src/osd/osd_types_fmt.h +++ b/src/osd/osd_types_fmt.h @@ -114,7 +114,7 @@ struct fmt::formatter { template 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); } }; diff --git a/src/osd/scrubber/pg_scrubber.cc b/src/osd/scrubber/pg_scrubber.cc index f424d3e52d60..bcf74d0e4398 100644 --- a/src/osd/scrubber/pg_scrubber.cc +++ b/src/osd/scrubber/pg_scrubber.cc @@ -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()