mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
osd/PG: drop 'seed' property from Scrubber
This has been -1 for many releases now. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
5ac3bfa34c
commit
2d34e380c8
@ -35,7 +35,6 @@ struct MOSDRepScrub : public MOSDFastDispatchOp {
|
||||
hobject_t start; // lower bound of scrub, inclusive
|
||||
hobject_t end; // upper bound of scrub, exclusive
|
||||
bool deep; // true if scrub should be deep
|
||||
uint32_t seed; // seed value for digest calculation
|
||||
bool allow_preemption = false;
|
||||
|
||||
epoch_t get_map_epoch() const override {
|
||||
@ -51,11 +50,10 @@ struct MOSDRepScrub : public MOSDFastDispatchOp {
|
||||
MOSDRepScrub()
|
||||
: MOSDFastDispatchOp(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION),
|
||||
chunky(false),
|
||||
deep(false),
|
||||
seed(0) { }
|
||||
deep(false) { }
|
||||
|
||||
MOSDRepScrub(spg_t pgid, eversion_t scrub_to, epoch_t map_epoch, epoch_t min_epoch,
|
||||
hobject_t start, hobject_t end, bool deep, uint32_t seed,
|
||||
hobject_t start, hobject_t end, bool deep,
|
||||
bool preemption)
|
||||
: MOSDFastDispatchOp(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION),
|
||||
pgid(pgid),
|
||||
@ -66,7 +64,6 @@ struct MOSDRepScrub : public MOSDFastDispatchOp {
|
||||
start(start),
|
||||
end(end),
|
||||
deep(deep),
|
||||
seed(seed),
|
||||
allow_preemption(preemption) { }
|
||||
|
||||
|
||||
@ -83,7 +80,6 @@ public:
|
||||
<< ",start:" << start << ",end:" << end
|
||||
<< ",chunky:" << chunky
|
||||
<< ",deep:" << deep
|
||||
<< ",seed:" << seed
|
||||
<< ",version:" << header.version
|
||||
<< ",allow_preemption:" << (int)allow_preemption
|
||||
<< ")";
|
||||
@ -100,7 +96,7 @@ public:
|
||||
encode(end, payload);
|
||||
encode(deep, payload);
|
||||
encode(pgid.shard, payload);
|
||||
encode(seed, payload);
|
||||
encode((uint32_t)-1, payload); // seed
|
||||
encode(min_epoch, payload);
|
||||
encode(allow_preemption, payload);
|
||||
}
|
||||
@ -115,7 +111,10 @@ public:
|
||||
decode(end, p);
|
||||
decode(deep, p);
|
||||
decode(pgid.shard, p);
|
||||
decode(seed, p);
|
||||
{
|
||||
uint32_t seed;
|
||||
decode(seed, p);
|
||||
}
|
||||
if (header.version >= 7) {
|
||||
decode(min_epoch, p);
|
||||
} else {
|
||||
|
@ -2436,7 +2436,7 @@ int ECBackend::be_deep_scrub(
|
||||
sleeptime.set_from_double(cct->_conf->osd_debug_deep_scrub_sleep);
|
||||
|
||||
if (pos.data_pos == 0) {
|
||||
pos.data_hash = bufferhash(pos.seed);
|
||||
pos.data_hash = bufferhash(-1);
|
||||
}
|
||||
|
||||
uint64_t stride = cct->_conf->osd_deep_scrub_stride;
|
||||
@ -2518,7 +2518,7 @@ int ECBackend::be_deep_scrub(
|
||||
}
|
||||
}
|
||||
|
||||
o.omap_digest = pos.seed;
|
||||
o.omap_digest = -1;
|
||||
o.omap_digest_present = true;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1040,8 +1040,7 @@ PG::Scrubber::Scrubber()
|
||||
auto_repair(false),
|
||||
num_digest_updates_pending(0),
|
||||
state(INACTIVE),
|
||||
deep(false),
|
||||
seed(0)
|
||||
deep(false)
|
||||
{}
|
||||
|
||||
PG::Scrubber::~Scrubber() {}
|
||||
@ -3876,17 +3875,17 @@ void PG::do_replica_scrub_map(OpRequestRef op)
|
||||
void PG::_request_scrub_map(
|
||||
pg_shard_t replica, eversion_t version,
|
||||
hobject_t start, hobject_t end,
|
||||
bool deep, uint32_t seed,
|
||||
bool deep,
|
||||
bool allow_preemption)
|
||||
{
|
||||
assert(replica != pg_whoami);
|
||||
dout(10) << "scrub requesting scrubmap from osd." << replica
|
||||
<< " deep " << (int)deep << " seed " << seed << dendl;
|
||||
<< " deep " << (int)deep << dendl;
|
||||
MOSDRepScrub *repscrubop = new MOSDRepScrub(
|
||||
spg_t(info.pgid.pgid, replica.shard), version,
|
||||
get_osdmap()->get_epoch(),
|
||||
get_last_peering_reset(),
|
||||
start, end, deep, seed,
|
||||
start, end, deep,
|
||||
allow_preemption);
|
||||
// default priority, we want the rep scrub processed prior to any recovery
|
||||
// or client io messages (we are holding a lock!)
|
||||
@ -4201,7 +4200,6 @@ int PG::build_scrub_map_chunk(
|
||||
hobject_t start,
|
||||
hobject_t end,
|
||||
bool deep,
|
||||
uint32_t seed,
|
||||
ThreadPool::TPHandle &handle)
|
||||
{
|
||||
dout(10) << __func__ << " [" << start << "," << end << ") "
|
||||
@ -4211,7 +4209,6 @@ int PG::build_scrub_map_chunk(
|
||||
// start
|
||||
while (pos.empty()) {
|
||||
pos.deep = deep;
|
||||
pos.seed = seed;
|
||||
map.valid_through = info.last_update;
|
||||
osr->flush();
|
||||
|
||||
@ -4577,7 +4574,6 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
|
||||
osd->clog->debug(oss);
|
||||
}
|
||||
|
||||
scrubber.seed = -1;
|
||||
scrubber.preempt_left = cct->_conf->get_val<uint64_t>(
|
||||
"osd_scrub_max_preemptions");
|
||||
scrubber.preempt_divisor = 1;
|
||||
@ -4697,7 +4693,6 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
|
||||
if (*i == pg_whoami) continue;
|
||||
_request_scrub_map(*i, scrubber.subset_last_update,
|
||||
scrubber.start, scrubber.end, scrubber.deep,
|
||||
scrubber.seed,
|
||||
scrubber.preempt_left > 0);
|
||||
scrubber.waiting_on_whom.insert(*i);
|
||||
}
|
||||
@ -4741,7 +4736,7 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
|
||||
scrubber.primary_scrubmap,
|
||||
scrubber.primary_scrubmap_pos,
|
||||
scrubber.start, scrubber.end,
|
||||
scrubber.deep, scrubber.seed,
|
||||
scrubber.deep,
|
||||
handle);
|
||||
if (ret == -EINPROGRESS) {
|
||||
requeue_scrub();
|
||||
@ -4844,7 +4839,7 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
|
||||
scrubber.replica_scrubmap,
|
||||
scrubber.replica_scrubmap_pos,
|
||||
scrubber.start, scrubber.end,
|
||||
scrubber.deep, scrubber.seed,
|
||||
scrubber.deep,
|
||||
handle);
|
||||
}
|
||||
if (ret == -EINPROGRESS) {
|
||||
@ -7703,7 +7698,6 @@ boost::statechart::result PG::RecoveryState::Active::react(const QueryState& q)
|
||||
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_unsigned("scrubber.seed", pg->scrubber.seed);
|
||||
{
|
||||
q.f->open_array_section("scrubber.waiting_on_whom");
|
||||
for (set<pg_shard_t>::iterator p = pg->scrubber.waiting_on_whom.begin();
|
||||
|
@ -1516,7 +1516,6 @@ public:
|
||||
std::unique_ptr<Scrub::Store> store;
|
||||
// deep scrub
|
||||
bool deep;
|
||||
uint32_t seed;
|
||||
int preempt_left;
|
||||
int preempt_divisor;
|
||||
|
||||
@ -1578,7 +1577,6 @@ public:
|
||||
large_omap_objects = 0;
|
||||
fixed = 0;
|
||||
deep = false;
|
||||
seed = 0;
|
||||
run_callbacks();
|
||||
inconsistent.clear();
|
||||
missing.clear();
|
||||
@ -1631,11 +1629,11 @@ protected:
|
||||
ThreadPool::TPHandle &handle);
|
||||
void _request_scrub_map(pg_shard_t replica, eversion_t version,
|
||||
hobject_t start, hobject_t end, bool deep,
|
||||
uint32_t seed, bool allow_preemption);
|
||||
bool allow_preemption);
|
||||
int build_scrub_map_chunk(
|
||||
ScrubMap &map,
|
||||
ScrubMapBuilder &pos,
|
||||
hobject_t start, hobject_t end, bool deep, uint32_t seed,
|
||||
hobject_t start, hobject_t end, bool deep,
|
||||
ThreadPool::TPHandle &handle);
|
||||
/**
|
||||
* returns true if [begin, end) is good to scrub at this time
|
||||
|
@ -675,7 +675,7 @@ int ReplicatedBackend::be_deep_scrub(
|
||||
assert(poid == pos.ls[pos.pos]);
|
||||
if (!pos.data_done()) {
|
||||
if (pos.data_pos == 0) {
|
||||
pos.data_hash = bufferhash(pos.seed);
|
||||
pos.data_hash = bufferhash(-1);
|
||||
}
|
||||
|
||||
bufferlist bl;
|
||||
@ -713,7 +713,7 @@ int ReplicatedBackend::be_deep_scrub(
|
||||
|
||||
// omap header
|
||||
if (pos.omap_pos.empty()) {
|
||||
pos.omap_hash = bufferhash(pos.seed);
|
||||
pos.omap_hash = bufferhash(-1);
|
||||
|
||||
bufferlist hdrbl;
|
||||
r = store->omap_get_header(
|
||||
|
@ -4962,7 +4962,6 @@ WRITE_CLASS_ENCODER(ScrubMap)
|
||||
|
||||
struct ScrubMapBuilder {
|
||||
bool deep = false;
|
||||
uint32_t seed = 0;
|
||||
vector<hobject_t> ls;
|
||||
size_t pos = 0;
|
||||
int64_t data_pos = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user