env_conditions.random_backoff_active = true;
} else if (is_recovery_active && !conf->osd_scrub_during_recovery) {
- if (conf->osd_repair_during_recovery) {
- dout(15)
- << "will only schedule explicitly requested repair due to active "
- "recovery"
- << dendl;
- env_conditions.allow_requested_repair_only = true;
-
- } else {
- dout(15) << "recovery in progress. Operator-initiated scrubs only."
- << dendl;
- env_conditions.recovery_in_progress = true;
- }
+ dout(15) << "recovery in progress. Operator-initiated scrubs only."
+ << dendl;
+ env_conditions.recovery_in_progress = true;
} else {
// regular, i.e. non-high-priority scrubs are allowed
}
}
- // if only explicitly requested repairing is allowed - skip other types
- // of scrubbing
- if (osd_restrictions.allow_requested_repair_only &&
- ScrubJob::observes_recovery(trgt.urgency())) {
- dout(10) << __func__
- << ": skipping this PG as repairing was not explicitly "
- "requested for it"
- << dendl;
- requeue_penalized(
- s_or_d, delay_both_targets_t::yes, delay_cause_t::scrub_params,
- clock_now);
- return schedule_result_t::target_specific_failure;
- }
-
// try to reserve the local OSD resources. If failing: no harm. We will
// be retried by the OSD later on.
if (!reserve_local(trgt)) {
/// rolled a dice, and decided not to scrub in this tick
bool random_backoff_active{false};
- /// the OSD is performing recovery & osd_repair_during_recovery is 'true'
- bool allow_requested_repair_only:1{false};
-
/// the CPU load is high. No regular scrubs are allowed.
bool cpu_overloaded:1{false};
/// outside of allowed scrubbing hours/days
bool restricted_time:1{false};
- /// the OSD is performing a recovery, osd_scrub_during_recovery is 'false',
- /// and so is osd_repair_during_recovery
+ /// the OSD is performing a recovery & osd_scrub_during_recovery is 'false'
bool recovery_in_progress:1{false};
};
static_assert(sizeof(Scrub::OSDRestrictions) <= sizeof(uint32_t));
auto format(const Scrub::OSDRestrictions& conds, FormatContext& ctx) const
{
return fmt::format_to(
- ctx.out(), "<{}.{}.{}.{}.{}.{}>",
+ ctx.out(), "<{}.{}.{}.{}.{}>",
conds.max_concurrency_reached ? "max-scrubs" : "",
conds.random_backoff_active ? "backoff" : "",
conds.cpu_overloaded ? "high-load" : "",
conds.restricted_time ? "time-restrict" : "",
- conds.recovery_in_progress ? "recovery" : "",
- conds.allow_requested_repair_only ? "repair-only" : "");
+ conds.recovery_in_progress ? "recovery" : "");
}
};