diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f89bd828ceb..1d0ca9c57f2 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6088,9 +6088,10 @@ OSDService::ScrubJob::ScrubJob(const spg_t& pg, const utime_t& timestamp, pool_scrub_max_interval : g_conf->osd_scrub_max_interval; sched_time += scrub_min_interval; - if (g_conf->osd_scrub_interval_randomize_ratio > 0) { - sched_time += rand() % (int)(scrub_min_interval * - g_conf->osd_scrub_interval_randomize_ratio); + int divisor = scrub_min_interval * + g_conf->osd_scrub_interval_randomize_ratio; + if (divisor > 0) { + sched_time += rand() % divisor; } deadline += scrub_max_interval; } diff --git a/src/osd/PG.cc b/src/osd/PG.cc index f0dd6520601..ffbd6ff8f05 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -6673,6 +6673,12 @@ boost::statechart::result PG::RecoveryState::Active::react(const QueryState& q) q.f->open_object_section("scrub"); q.f->dump_stream("scrubber.epoch_start") << pg->scrubber.epoch_start; q.f->dump_int("scrubber.active", pg->scrubber.active); + q.f->dump_string("scrubber.state", Scrubber::state_string(pg->scrubber.state)); + q.f->dump_stream("scrubber.start") << pg->scrubber.start; + q.f->dump_stream("scrubber.end") << pg->scrubber.end; + q.f->dump_stream("scrubber.subset_last_update") << pg->scrubber.subset_last_update; + q.f->dump_bool("scrubber.deep", pg->scrubber.deep); + q.f->dump_int("scrubber.seed", pg->scrubber.seed); q.f->dump_int("scrubber.waiting_on", pg->scrubber.waiting_on); { q.f->open_array_section("scrubber.waiting_on_whom"); diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 8e7b757f29e..6d33c01b948 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -818,8 +818,9 @@ void ReplicatedBackend::be_deep_scrub( } ++keys_scanned; - dout(25) << "CRC key " << iter->key() << " value " - << string(iter->value().c_str(), iter->value().length()) << dendl; + dout(25) << "CRC key " << iter->key() << " value:\n"; + iter->value().hexdump(*_dout); + *_dout << dendl; ::encode(iter->key(), bl); ::encode(iter->value(), bl);