From: xie xingguo Date: Tue, 16 Jun 2020 02:08:32 +0000 (+0800) Subject: common, osd: add sanity checks around osd_scrub_max_preemptions X-Git-Tag: v15.2.5~142^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36034%2Fhead;p=ceph.git 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 (cherry picked from commit ae05de3e9b2e9868216e5168e50dfcb5074684cb) --- diff --git a/src/common/options.cc b/src/common/options.cc index db440588bd1..f3c848579dd 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3236,6 +3236,7 @@ std::vector