Feature #40955
closedExtend the scrub sleep time when the period is outside [osd_scrub_begin_hour, osd_scrub_end_hour)
0%
Description
We already have osd_scrub_begin_week_day, osd_scrub_end_week_day, osd_scrub_begin_hour and osd_scrub_end_hour to tell OSD what period is proper to schedule scrubbing.
However, some scrub may happen to be scheduled just a short time before osd_scrub_begin_hour and cannot complete before osd_scrub_begin_hour, thus crosses the boundary of [osd_scrub_begin_hour, osd_scrub_end_hour).
In order to mitigate such impact of the scrubs, we may add a new option osd_scrub_extended_sleep (default is 0) and the logic is as follows:
1. when scrub_time_permit() return true, the existing osd_scrub_sleep is used 2. when scrub_time_permit() return false, there may be 2 scenarios 2.1 if osd_scrub_extended_sleep <= osd_scrub_sleep, let's take osd_scrub_sleep 2.2 otherwise, let's take osd_scrub_extended_sleep
So we can set a relatively large value (such as 10) to osd_scrub_extended_sleep. Thus the scrubs across the boundary of [osd_scrub_begin_hour, osd_scrub_end_hour) may be suppressed and the impact on client IO will be mitigated.