From: Ronen Friedman Date: Sun, 17 Mar 2024 13:55:33 +0000 (-0500) Subject: osd/scrub: fixing int64_t narrowing conversion X-Git-Tag: v20.0.0~2135^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c992280dcd5e7d180dfa489e32101e6a0b84047;p=ceph.git osd/scrub: fixing int64_t narrowing conversion Signed-off-by: Ronen Friedman --- diff --git a/src/osd/scrubber/osd_scrub.cc b/src/osd/scrubber/osd_scrub.cc index d2d2db3ff72..48f978b18e3 100644 --- a/src/osd/scrubber/osd_scrub.cc +++ b/src/osd/scrubber/osd_scrub.cc @@ -266,10 +266,10 @@ OsdScrub::LoadTracker::LoadTracker( ///\todo replace with Knuth's algo (to reduce the numerical error) std::optional OsdScrub::LoadTracker::update_load_average() { - int hb_interval = conf->osd_heartbeat_interval; + auto hb_interval = conf->osd_heartbeat_interval; int n_samples = std::chrono::duration_cast(24h).count(); if (hb_interval > 1) { - n_samples = std::max(n_samples / hb_interval, 1); + n_samples = std::max(n_samples / hb_interval, 1L); } double loadavg;