From 7104a4e8daa173585b1e7c4f4b226d8bcf7d61f3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 26 Apr 2017 18:10:31 -0400 Subject: [PATCH] osd/PG: debug scrub range Signed-off-by: Sage Weil --- src/osd/PG.cc | 5 ++++- src/osd/PrimaryLogPG.cc | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 4ecc8fbbc9b..53b5a2a1417 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4358,7 +4358,8 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) int ret; while (!done) { - dout(20) << "scrub state " << Scrubber::state_string(scrubber.state) << dendl; + dout(20) << "scrub state " << Scrubber::state_string(scrubber.state) + << " [" << scrubber.start << "," << scrubber.end << ")" << dendl; switch (scrubber.state) { case PG::Scrubber::INACTIVE: @@ -4604,6 +4605,8 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) ceph_abort(); } } + dout(20) << "scrub final state " << Scrubber::state_string(scrubber.state) + << " [" << scrubber.start << "," << scrubber.end << ")" << dendl; } void PG::scrub_clear_state() diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index df25ddf8b0d..82472820167 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -7294,7 +7294,12 @@ void PrimaryLogPG::apply_stats( if (is_primary() && scrubber.active) { if (soid < scrubber.start) { + dout(20) << __func__ << " " << soid << " < [" << scrubber.start + << "," << scrubber.end << ")" << dendl; scrub_cstat.add(delta_stats); + } else { + dout(20) << __func__ << " " << soid << " >= [" << scrubber.start + << "," << scrubber.end << ")" << dendl; } } } -- 2.39.5