]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common, osd: add sanity checks around osd_scrub_max_preemptions 36034/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 16 Jun 2020 02:08:32 +0000 (10:08 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 10 Jul 2020 21:30:10 +0000 (23:30 +0200)
commit544c7ff54202998835fcec4a0efe1ef8d6e29402
tree38e9bce536aa92b9649f687f1440d43dcef0d38d
parent690c7ca1a27b11ba119fbc95e96319b1f3233753
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)
src/common/options.cc
src/osd/PG.cc