mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
Merge pull request #18354 from kungf/no_scurb_deadline
osd: make scrub no deadline when max interval is zero Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
commit
1cb521e08c
@ -6904,7 +6904,12 @@ OSDService::ScrubJob::ScrubJob(CephContext* cct,
|
||||
double r = rand() / (double)RAND_MAX;
|
||||
sched_time +=
|
||||
scrub_min_interval * cct->_conf->osd_scrub_interval_randomize_ratio * r;
|
||||
deadline += scrub_max_interval;
|
||||
if (scrub_max_interval == 0) {
|
||||
deadline = utime_t();
|
||||
} else {
|
||||
deadline += scrub_max_interval;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -7007,7 +7012,7 @@ void OSD::sched_scrub()
|
||||
break;
|
||||
}
|
||||
|
||||
if ((scrub.deadline >= now) && !(time_permit && load_is_low)) {
|
||||
if ((scrub.deadline.is_zero() || scrub.deadline >= now) && !(time_permit && load_is_low)) {
|
||||
dout(10) << __func__ << " not scheduling scrub for " << scrub.pgid << " due to "
|
||||
<< (!time_permit ? "time not permit" : "high load") << dendl;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user