ScrubJob::observes_random_backoff(e.urgency)) {
return false;
}
- if (!r.time_permit && ScrubJob::observes_allowed_hours(e.urgency)) {
+ if (r.restricted_time && ScrubJob::observes_allowed_hours(e.urgency)) {
return false;
}
- if (!r.load_is_low && ScrubJob::observes_load_limit(e.urgency)) {
+ if (r.cpu_overloaded && ScrubJob::observes_load_limit(e.urgency)) {
return false;
}
if (r.recovery_in_progress && ScrubJob::observes_recovery(e.urgency)) {
} else {
// regular, i.e. non-high-priority scrubs are allowed
- env_conditions.time_permit = scrub_time_permit(scrub_clock_now);
- env_conditions.load_is_low = m_load_tracker.scrub_load_below_threshold();
+ env_conditions.restricted_time = !scrub_time_permit(scrub_clock_now);
+ env_conditions.cpu_overloaded =
+ !m_load_tracker.scrub_load_below_threshold();
env_conditions.only_deadlined =
- !env_conditions.time_permit || !env_conditions.load_is_low;
+ env_conditions.restricted_time || env_conditions.cpu_overloaded;
}
return env_conditions;
/// the load is high, or the time is not right. For periodic scrubs,
/// only the overdue ones are allowed.
bool only_deadlined:1{false};
- bool load_is_low:1{true};
- bool time_permit:1{true};
+ bool cpu_overloaded:1{false};
+ bool restricted_time:1{false};
+
/// the OSD is performing a recovery, osd_scrub_during_recovery is 'false',
/// and so is osd_repair_during_recovery
bool recovery_in_progress:1{false};
ctx.out(), "<{}.{}.{}.{}.{}.{}>",
conds.max_concurrency_reached ? "max-scrubs" : "",
conds.random_backoff_active ? "backoff" : "",
- conds.load_is_low ? "" : "high-load",
- conds.time_permit ? "" : "time-restrict",
+ conds.cpu_overloaded ? "high-load" : "",
+ conds.restricted_time ? "time-restrict" : "",
conds.recovery_in_progress ? "recovery" : "",
conds.allow_requested_repair_only ? "repair-only" : "");
}