From ae05de3e9b2e9868216e5168e50dfcb5074684cb Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 16 Jun 2020 10:08:32 +0800 Subject: [PATCH] common, osd: add sanity checks around osd_scrub_max_preemptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/options.cc | 1 + src/osd/PG.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/src/common/options.cc b/src/common/options.cc index 495dc5273c136..6e0430375ed8e 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3257,6 +3257,7 @@ std::vector