From: Ronen Friedman Date: Thu, 28 May 2026 16:08:41 +0000 (+0000) Subject: osd/scrub: guarantee the double version of abs() X-Git-Tag: v21.0.1~55^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0b148b0143e2abb692ad1208d1b78df817792204;p=ceph.git osd/scrub: guarantee the double version of abs() Signed-off-by: Ronen Friedman --- diff --git a/src/osd/scrubber/scrub_job.cc b/src/osd/scrubber/scrub_job.cc index 2c33492fb22..08014834ef3 100644 --- a/src/osd/scrubber/scrub_job.cc +++ b/src/osd/scrubber/scrub_job.cc @@ -158,8 +158,8 @@ double ScrubJob::guaranteed_offset( if (s_or_d == scrub_level_t::deep) { // use the sdv of the deep scrub distribution, times 3 (3-sigma...) const double sdv = app_conf.deep_interval * app_conf.deep_randomize_ratio; - // note: the '+10.0' is there just to guarantee inequality if '._ratio' is 0 - return app_conf.deep_interval + abs(3 * sdv) + 10.0; + // note: the '+10.0' is there just to guarantee inequality if '._ratio' is 0 + return app_conf.deep_interval + std::abs(3 * sdv) + 10.0; } // shallow scrub