diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 8cc4e4eda3e..790bdadff72 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3929,7 +3929,6 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) } scrubber.end = candidate_end; } - scrubber.block_writes = true; // walk the log to find the latest update that affects our chunk scrubber.subset_last_update = pg_log.get_tail(); @@ -4015,7 +4014,7 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) assert(scrubber.waiting_on == 0); scrub_compare_maps(); - scrubber.block_writes = false; + scrubber.start = scrubber.end; scrubber.run_callbacks(); // requeue the writes from the chunk that just finished @@ -4035,9 +4034,6 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) } if (scrubber.end < hobject_t::get_max()) { - // schedule another leg of the scrub - scrubber.start = scrubber.end; - scrubber.state = PG::Scrubber::NEW_CHUNK; osd->scrub_wq.queue(this); done = true; @@ -6447,7 +6443,6 @@ 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_int("scrubber.block_writes", pg->scrubber.block_writes); 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/PG.h b/src/osd/PG.h index 5835c2f0382..b806a673011 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1025,7 +1025,7 @@ public: Scrubber() : reserved(false), reserve_failed(false), epoch_start(0), - block_writes(false), active(false), queue_snap_trim(false), + active(false), queue_snap_trim(false), waiting_on(0), shallow_errors(0), deep_errors(0), fixed(0), active_rep_scrub(0), must_scrub(false), must_deep_scrub(false), must_repair(false), @@ -1042,7 +1042,6 @@ public: epoch_t epoch_start; // common to both scrubs - bool block_writes; bool active; bool queue_snap_trim; int waiting_on; @@ -1126,9 +1125,6 @@ public: // classic (non chunk) scrubs block all writes // chunky scrubs only block writes to a range bool write_blocked_by_scrub(const hobject_t &soid) { - if (!block_writes) - return false; - if (soid >= start && soid < end) return true; @@ -1137,7 +1133,6 @@ public: // clear all state void reset() { - block_writes = false; active = false; queue_snap_trim = false; waiting_on = 0; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 0a54565d5ba..fa623ed1d94 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -7290,7 +7290,7 @@ void ReplicatedPG::op_applied(const eversion_t &applied_version) osd->scrub_wq.queue(this); } } else { - assert(!scrubber.block_writes); + assert(scrubber.start == scrubber.end); } } else { if (scrubber.active_rep_scrub) {