]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: guarantee the double version of abs()
authorRonen Friedman <rfriedma@redhat.com>
Thu, 28 May 2026 16:08:41 +0000 (16:08 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Fri, 29 May 2026 04:35:04 +0000 (04:35 +0000)
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/scrub_job.cc

index 2c33492fb22bcd5f200bf78490e3bc38ae9a8b83..08014834ef3de6bec0de651e7af0587eaae93870 100644 (file)
@@ -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