common, osd: add sanity checks around osd_scrub_max_preemptions
to limit maximum preempt_divisor we can use when backing off the
chunky-scrub range on preempting.
Otherwise large osd_scrub_max_preemptions values (i.e., >= 32)
would cause preempt_divisor overflow, hence the dreaded
“divide by zero error”.
Fixes: https://tracker.ceph.com/issues/46024
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit
ae05de3e9b2e9868216e5168e50dfcb5074684cb)
Conflicts:
src/osd/PG.cc
- git got confused about where the change was/is