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