avoid unnecessary comparison
Signed-off-by: Kefu Chai <kchai@redhat.com>
<< " >= max " << cct->_conf->osd_scrub_load_threshold
<< " = no, load too high" << dendl;
return false;
+ } else {
+ dout(20) << __func__ << " loadavg " << loadavgs[0]
+ << " < max " << cct->_conf->osd_scrub_load_threshold
+ << " = yes" << dendl;
+ return true;
}
-
- dout(20) << "scrub_should_schedule loadavg " << loadavgs[0]
- << " < max " << cct->_conf->osd_scrub_load_threshold
- << " = yes" << dendl;
- return loadavgs[0] < cct->_conf->osd_scrub_load_threshold;
}
void OSD::sched_scrub()