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: v14.2.12~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=42b3541fefea43190e6f5f54a89d4a13d1d528ee;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) Conflicts: src/osd/PG.cc - git got confused about where the change was/is --- diff --git a/src/common/options.cc b/src/common/options.cc index a9baa317aa9a..54c2c516a940 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3600,6 +3600,7 @@ std::vector