std::lock_guard l(sched_scrub_lock);
if (sched_scrub_pg.empty())
return false;
- std::set<ScrubJob>::const_iterator iter = sched_scrub_pg.lower_bound(next);
- if (iter == sched_scrub_pg.cend())
- return false;
- ++iter;
+ std::set<ScrubJob>::const_iterator iter = sched_scrub_pg.upper_bound(next);
if (iter == sched_scrub_pg.cend())
return false;
*out = *iter;
std::vector<uint32_t> hb_front_min;
std::vector<uint32_t> hb_front_max;
- bool is_stale(utime_t stale) {
+ bool is_stale(utime_t stale) const {
if (ping_history.empty()) {
return false;
}
return oldest_deadline <= stale;
}
- bool is_unhealthy(utime_t now) {
+ bool is_unhealthy(utime_t now) const {
if (ping_history.empty()) {
/// we haven't sent a ping yet or we have got all replies,
/// in either way we are safe and healthy for now
return now > oldest_deadline;
}
- bool is_healthy(utime_t now) {
+ bool is_healthy(utime_t now) const {
if (last_rx_front == utime_t() || last_rx_back == utime_t()) {
// only declare to be healthy until we have received the first
// replies from both front/back connections
float get_osd_snap_trim_sleep();
int get_recovery_max_active();
+ bool maybe_override_options_for_qos();
void scrub_purged_snaps();
void probe_smart(const std::string& devid, std::ostream& ss);