From: Adam Emerson Date: Wed, 27 Nov 2024 22:14:19 +0000 (-0500) Subject: os/bluestore: Fix signed comparison warning X-Git-Tag: testing/wip-pdonnell-testing-20250212.160734-debug~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fdcc1d4f296e67cc14a47eac5f866798ced94344;p=ceph-ci.git os/bluestore: Fix signed comparison warning Fixes: https://tracker.ceph.com/issues/69240 Signed-off-by: Adam Emerson --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index a024a0c2105..05142ebb7d3 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -18654,7 +18655,7 @@ bool BlueStore::BlueStoreThrottle::try_start_transaction( { std::lock_guard l(lock); auto cost0 = throttle_bytes.get_current(); - if (cost0 + txc.cost > bytes_observed_max) { + if (std::cmp_greater(cost0 + txc.cost, bytes_observed_max)) { bytes_observed_max = cost0 + txc.cost; bytes_max_ts = ceph_clock_now(); }