]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/scrub: change all dump_stream() in pg_scrubber.cc wip-rf-dumptargets
authorRonen Friedman <rfriedma@redhat.com>
Sun, 28 Dec 2025 13:00:13 +0000 (13:00 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 5 Jan 2026 13:30:57 +0000 (15:30 +0200)
... to dump_named_fmt(), completing the transition started with
the previous commits.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/pg_scrubber.cc

index f29e97ef8a59b38d71d66c12413ddb80aa395ee8..884e8241d4efc5d3563e980eefee22bcc9e9a494 100644 (file)
@@ -713,7 +713,7 @@ void asok_response_section(
   Formatter::ObjectSection asok_resp_section{*f, "result"sv};
   f->dump_bool("deep", (scrub_level == scrub_level_t::deep));
   f->dump_bool("must", !is_periodic);
-  f->dump_stream("stamp") << stamp;
+  f->dump_named_fmt("stamp", "{}", stamp);
 }
 }  // namespace
 
@@ -2352,11 +2352,11 @@ void PgScrubber::dump_scrubber(ceph::Formatter* f) const
 
 void PgScrubber::dump_active_scrubber(ceph::Formatter* f) const
 {
-  f->dump_stream("epoch_start") << m_interval_start;
-  f->dump_stream("start") << m_start;
-  f->dump_stream("end") << m_end;
-  f->dump_stream("max_end") << m_max_end;
-  f->dump_stream("subset_last_update") << m_subset_last_update;
+  f->dump_named_fmt("epoch_start", "{}", m_interval_start);
+  f->dump_named_fmt("start", "{}", m_start);
+  f->dump_named_fmt("end", "{}", m_end);
+  f->dump_named_fmt("max_end", "{}", m_max_end);
+  f->dump_named_fmt("subset_last_update", "{}", m_subset_last_update);
   f->dump_bool("deep", m_active_target->is_deep());
 
   // dump the scrub-type flags
@@ -2371,7 +2371,9 @@ void PgScrubber::dump_active_scrubber(ceph::Formatter* f) const
   f->dump_int("fixed", m_fixed_count);
   f->with_array_section(
       "waiting_on_whom"sv, m_maps_status.get_awaited(),
-      [](Formatter& f, const pg_shard_t& sh) { f.dump_stream("shard") << sh; });
+      [](Formatter& f, const pg_shard_t& sh) {
+        f.dump_named_fmt("shard", "{}", sh);
+      });
 
   if (m_scrub_job->blocked) {
     f->dump_string("schedule", "blocked");
@@ -2383,12 +2385,13 @@ void PgScrubber::dump_active_scrubber(ceph::Formatter* f) const
     f->dump_bool("is_reserving_replicas", true);
     f->dump_int("osd_to_respond", maybe_register->m_osd_to_respond);
     f->dump_int("duration_seconds", maybe_register->m_duration_seconds);
-    f->dump_int("requested_in_order", maybe_register->m_ordinal_of_requested_replica);
+    f->dump_int(
+        "requested_in_order", maybe_register->m_ordinal_of_requested_replica);
     f->dump_int("num_to_reserve", maybe_register->m_num_to_reserve);
   } else {
     f->dump_bool("is_reserving_replicas", false);
   }
-  f->dump_named_fmt("urgency", "{}",m_active_target->urgency());
+  f->dump_named_fmt("urgency", "{}", m_active_target->urgency());
 }
 
 pg_scrubbing_status_t PgScrubber::get_schedule() const
@@ -2499,16 +2502,18 @@ void PgScrubber::handle_query_state(ceph::Formatter* f)
   dout(15) << __func__ << dendl;
 
   Formatter::ObjectSection scrub_section{*f, "scrub"sv};
-  f->dump_stream("scrubber.epoch_start") << m_interval_start;
+  f->dump_named_fmt("scrubber.epoch_start", "{}", m_interval_start);
   f->dump_bool("scrubber.active", m_active);
-  f->dump_stream("scrubber.start") << m_start;
-  f->dump_stream("scrubber.end") << m_end;
-  f->dump_stream("scrubber.max_end") << m_max_end;
-  f->dump_stream("scrubber.subset_last_update") << m_subset_last_update;
+  f->dump_named_fmt("scrubber.start", "{}", m_start);
+  f->dump_named_fmt("scrubber.end", "{}", m_end);
+  f->dump_named_fmt("scrubber.max_end", "{}", m_max_end);
+  f->dump_named_fmt("scrubber.subset_last_update", "{}", m_subset_last_update);
   f->dump_bool("scrubber.deep", m_is_deep);
   f->with_array_section(
       "waiting_on_whom"sv, m_maps_status.get_awaited(),
-      [](Formatter& f, const pg_shard_t& sh) { f.dump_stream("shard") << sh; });
+      [](Formatter& f, const pg_shard_t& sh) {
+        f.dump_named_fmt("shard", "{}", sh);
+      });
   f->dump_string("comment", "DEPRECATED - may be removed in the next release");
 }