mirror of
https://github.com/ceph/ceph
synced 2025-02-21 09:57:26 +00:00
Merge pull request #3588 from athanatos/wip-10693
Wip 10693 Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
3c7500b60c
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user