@@ -189,7 +189,8 @@ Scrub::OSDRestrictions OsdScrub::restrictions_on_scrubbing(
189189{
190190 Scrub::OSDRestrictions env_conditions;
191191
192- // some environmental conditions prevent all but high priority scrubs
192+ // some "environmental conditions" prevent all but specific types
193+ // (urgency levels) of scrubs
193194
194195 if (!m_resource_bookkeeper.can_inc_scrubs ()) {
195196 // our local OSD is already running too many scrubs
@@ -198,21 +199,20 @@ Scrub::OSDRestrictions OsdScrub::restrictions_on_scrubbing(
198199
199200 } else if (scrub_random_backoff ()) {
200201 // dice-roll says we should not scrub now
201- dout (15 ) << " Lost in dice. Only high priority scrubs allowed." << dendl;
202+ dout (15 ) << " Lost on the dice. Regular scheduled scrubs are not permitted."
203+ << dendl;
202204 env_conditions.random_backoff_active = true ;
205+ }
203206
204- } else if (is_recovery_active && !conf->osd_scrub_during_recovery ) {
207+ if (is_recovery_active && !conf->osd_scrub_during_recovery ) {
205208 dout (15 ) << " recovery in progress. Operator-initiated scrubs only."
206209 << dendl;
207210 env_conditions.recovery_in_progress = true ;
208- } else {
209-
210- // regular, i.e. non-high-priority scrubs are allowed
211- env_conditions.restricted_time = !scrub_time_permit (scrub_clock_now);
212- env_conditions.cpu_overloaded =
213- !m_load_tracker.scrub_load_below_threshold ();
214211 }
215212
213+ env_conditions.restricted_time = !scrub_time_permit (scrub_clock_now);
214+ env_conditions.cpu_overloaded = !m_load_tracker.scrub_load_below_threshold ();
215+
216216 return env_conditions;
217217}
218218
0 commit comments