Skip to content

Commit 7ea1f01

Browse files
authored
Merge pull request ceph#59709 from ronen-fr/wip-rf-rm-flag
osd/scrub: remove the requested_scrub flags set Reviewed-by: Samuel Just <[email protected]>
2 parents 0d71a88 + 5f956e5 commit 7ea1f01

File tree

10 files changed

+197
-415
lines changed

10 files changed

+197
-415
lines changed

src/osd/PG.cc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,12 +1279,6 @@ void PG::requeue_map_waiters()
12791279
}
12801280
}
12811281

1282-
bool PG::get_must_scrub() const
1283-
{
1284-
dout(20) << __func__ << " must_scrub? " << (m_planned_scrub.must_scrub ? "true" : "false") << dendl;
1285-
return m_planned_scrub.must_scrub;
1286-
}
1287-
12881282
unsigned int PG::scrub_requeue_priority(Scrub::scrub_prio_t with_priority) const
12891283
{
12901284
return m_scrubber->scrub_requeue_priority(with_priority);
@@ -1324,7 +1318,7 @@ Scrub::schedule_result_t PG::start_scrubbing(
13241318
get_pgbackend()->auto_repair_supported());
13251319

13261320
return m_scrubber->start_scrub_session(
1327-
candidate.level, osd_restrictions, pg_cond, m_planned_scrub);
1321+
candidate.level, osd_restrictions, pg_cond);
13281322
}
13291323

13301324
double PG::next_deepscrub_interval() const
@@ -1357,8 +1351,7 @@ void PG::on_scrub_schedule_input_change(Scrub::delay_ready_t delay_ready)
13571351
void PG::scrub_requested(scrub_level_t scrub_level, scrub_type_t scrub_type)
13581352
{
13591353
ceph_assert(m_scrubber);
1360-
std::ignore =
1361-
m_scrubber->scrub_requested(scrub_level, scrub_type, m_planned_scrub);
1354+
std::ignore = m_scrubber->scrub_requested(scrub_level, scrub_type);
13621355
}
13631356

13641357
void PG::clear_ready_to_merge() {
@@ -1913,11 +1906,10 @@ ostream& operator<<(ostream& out, const PG& pg)
19131906
{
19141907
out << pg.recovery_state;
19151908

1916-
// listing all scrub-related flags - both current and "planned next scrub"
1909+
// listing all scrub-related flags
19171910
if (pg.is_scrubbing()) {
19181911
out << *pg.m_scrubber;
19191912
}
1920-
out << pg.m_planned_scrub;
19211913

19221914
if (pg.recovery_ops_active)
19231915
out << " rops=" << pg.recovery_ops_active;

src/osd/PG.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,6 @@ class PG : public DoutPrefixProvider,
179179
/// and be removed only in the PrimaryLogPG destructor.
180180
std::unique_ptr<ScrubPgIF> m_scrubber;
181181

182-
/// flags detailing scheduling/operation characteristics of the next scrub
183-
requested_scrub_t m_planned_scrub;
184-
185-
const requested_scrub_t& get_planned_scrub() const {
186-
return m_planned_scrub;
187-
}
188-
189182
/// scrubbing state for both Primary & replicas
190183
bool is_scrub_active() const { return m_scrubber->is_scrub_active(); }
191184

@@ -686,8 +679,6 @@ class PG : public DoutPrefixProvider,
686679
void shutdown();
687680
virtual void on_shutdown() = 0;
688681

689-
bool get_must_scrub() const;
690-
691682
Scrub::schedule_result_t start_scrubbing(
692683
const Scrub::SchedEntry& candidate,
693684
Scrub::OSDRestrictions osd_restrictions);
@@ -1390,11 +1381,6 @@ class PG : public DoutPrefixProvider,
13901381

13911382
OSDService* get_pg_osd(ScrubberPasskey) const { return osd; }
13921383

1393-
requested_scrub_t& get_planned_scrub(ScrubberPasskey)
1394-
{
1395-
return m_planned_scrub;
1396-
}
1397-
13981384
void force_object_missing(ScrubberPasskey,
13991385
const std::set<pg_shard_t>& peer,
14001386
const hobject_t& oid,

src/osd/PrimaryLogPG.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ void PrimaryLogPG::do_command(
10551055
f->close_section();
10561056

10571057
if (is_primary() && is_active() && m_scrubber) {
1058-
m_scrubber->dump_scrubber(f.get(), m_planned_scrub);
1058+
m_scrubber->dump_scrubber(f.get());
10591059
}
10601060

10611061
f->open_object_section("agent_state");
@@ -1185,7 +1185,7 @@ void PrimaryLogPG::do_command(
11851185
if (is_primary()) {
11861186
scrub_level_t deep = (prefix == "deep-scrub") ? scrub_level_t::deep
11871187
: scrub_level_t::shallow;
1188-
m_scrubber->on_operator_forced_scrub(f.get(), deep, m_planned_scrub);
1188+
m_scrubber->on_operator_forced_scrub(f.get(), deep);
11891189
} else {
11901190
ss << "Not primary";
11911191
ret = -EPERM;
@@ -13226,7 +13226,7 @@ void PrimaryLogPG::_clear_recovery_state()
1322613226
#ifdef DEBUG_RECOVERY_OIDS
1322713227
recovering_oids.clear();
1322813228
#endif
13229-
dout(15) << __func__ << " flags: " << m_planned_scrub << dendl;
13229+
dout(15) << __func__ << dendl;
1323013230

1323113231
last_backfill_started = hobject_t();
1323213232
set<hobject_t>::iterator i = backfills_in_flight.begin();

src/osd/scrubber/osd_scrub.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ Scrub::schedule_result_t OsdScrub::initiate_a_scrub(
232232
const Scrub::SchedEntry& candidate,
233233
Scrub::OSDRestrictions restrictions)
234234
{
235-
dout(20) << fmt::format("trying pg[{}]", candidate.pgid) << dendl;
235+
dout(20) << fmt::format(
236+
"trying pg[{}] (target:{})", candidate.pgid, candidate)
237+
<< dendl;
236238

237239
// we have a candidate to scrub. We need some PG information to
238240
// know if scrubbing is allowed

0 commit comments

Comments
 (0)