@@ -59,14 +59,6 @@ ostream& operator<<(ostream& out, const scrub_flags_t& sf)
5959 return out;
6060}
6161
62- ostream& operator <<(ostream& out, const requested_scrub_t & sf)
63- {
64- if (sf.req_scrub )
65- out << " planned REQ_SCRUB" ;
66-
67- return out;
68- }
69-
7062void PgScrubber::on_replica_activate ()
7163{
7264 dout (10 ) << __func__ << dendl;
@@ -570,20 +562,19 @@ void PgScrubber::update_scrub_job(Scrub::delay_ready_t delay_ready)
570562
571563scrub_level_t PgScrubber::scrub_requested (
572564 scrub_level_t scrub_level,
573- scrub_type_t scrub_type,
574- requested_scrub_t & req_flags)
565+ scrub_type_t scrub_type)
575566{
576567 const bool repair_requested = (scrub_type == scrub_type_t ::do_repair);
577568 const bool deep_requested =
578569 (scrub_level == scrub_level_t ::deep) || repair_requested;
579570 scrub_level = deep_requested ? scrub_level_t ::deep : scrub_level_t ::shallow;
580571 dout (10 ) << fmt::format (
581572 " {}: {}{} scrub requested. "
582- " @entry:{}, last-stamp:{:s},Registered?{}" ,
573+ " @entry:last-stamp:{:s},Registered?{}" ,
583574 __func__,
584575 (scrub_type == scrub_type_t ::do_repair ? " repair + "
585576 : " not-repair + " ),
586- (deep_requested ? " deep" : " shallow" ), req_flags,
577+ (deep_requested ? " deep" : " shallow" ),
587578 m_scrub_job->get_sched_time (), registration_state ())
588579 << dendl;
589580
@@ -597,11 +588,6 @@ scrub_level_t PgScrubber::scrub_requested(
597588 return scrub_level_t ::shallow;
598589 }
599590
600- // modifying the planned-scrub flags - to be removed shortly
601- // User might intervene, so clear this
602- req_flags.req_scrub = true ;
603- dout (20 ) << fmt::format (" {}: planned scrub:{}" , __func__, req_flags) << dendl;
604-
605591 // update the relevant SchedTarget (either shallow or deep). Set its urgency
606592 // to either operator_requested or must_repair. Push it into the queue
607593 auto & trgt = m_scrub_job->get_target (scrub_level);
@@ -790,10 +776,9 @@ void PgScrubber::on_operator_periodic_cmd(
790776// when asked to force a high-priority scrub
791777void PgScrubber::on_operator_forced_scrub (
792778 ceph::Formatter* f,
793- scrub_level_t scrub_level,
794- requested_scrub_t & request_flags)
779+ scrub_level_t scrub_level)
795780{
796- auto deep_req = scrub_requested (scrub_level, scrub_type_t ::not_repair, request_flags );
781+ auto deep_req = scrub_requested (scrub_level, scrub_type_t ::not_repair);
797782 asok_response_section (f, false , deep_req);
798783}
799784
@@ -1878,8 +1863,6 @@ void PgScrubber::scrub_finish()
18781863 ceph_assert (m_pg->is_locked ());
18791864 ceph_assert (is_queued_or_active ());
18801865
1881- m_planned_scrub = requested_scrub_t {};
1882-
18831866 // if the repair request comes from auto-repair and large number of errors,
18841867 // we would like to cancel auto-repair
18851868 if (m_is_repair && m_flags.auto_repair &&
@@ -2125,9 +2108,8 @@ void PgScrubber::on_mid_scrub_abort(Scrub::delay_cause_t issue)
21252108
21262109 dout (10 ) << fmt::format (
21272110 " {}: executing target: {}. Session flags: {} up-to-date job: "
2128- " {} planned: {}" ,
2129- __func__, *m_active_target, m_flags, *m_scrub_job,
2130- m_planned_scrub)
2111+ " {}" ,
2112+ __func__, *m_active_target, m_flags, *m_scrub_job)
21312113 << dendl;
21322114
21332115 // copy the aborted target
@@ -2220,8 +2202,7 @@ void PgScrubber::requeue_penalized(
22202202Scrub::schedule_result_t PgScrubber::start_scrub_session (
22212203 scrub_level_t s_or_d,
22222204 Scrub::OSDRestrictions osd_restrictions,
2223- Scrub::ScrubPGPreconds pg_cond,
2224- const requested_scrub_t & requested_flags)
2205+ Scrub::ScrubPGPreconds pg_cond)
22252206{
22262207 auto & trgt = m_scrub_job->get_target (s_or_d);
22272208 dout (10 ) << fmt::format (
@@ -2361,14 +2342,9 @@ Scrub::schedule_result_t PgScrubber::start_scrub_session(
23612342}
23622343
23632344
2364- /*
2365- * note that the flags-set fetched from the PG (m_pg->m_planned_scrub)
2366- * is cleared once scrubbing starts; Some of the values dumped here are
2367- * thus transitory.
2368- */
2345+ // /\todo modify the fields dumped here to match the new scrub-job structure
23692346void PgScrubber::dump_scrubber (
2370- ceph::Formatter* f,
2371- const requested_scrub_t & request_flags) const
2347+ ceph::Formatter* f) const
23722348{
23732349 f->open_object_section (" scrubber" );
23742350
@@ -2546,7 +2522,6 @@ PgScrubber::PgScrubber(PG* pg)
25462522 , m_pg_id{pg->pg_id }
25472523 , m_osds{m_pg->osd }
25482524 , m_pg_whoami{pg->pg_whoami }
2549- , m_planned_scrub{pg->get_planned_scrub (ScrubberPasskey{})}
25502525 , preemption_data{pg}
25512526{
25522527 m_fsm = std::make_unique<ScrubMachine>(m_pg, this );
0 commit comments