]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: Fix signed comparison warning
authorAdam Emerson <aemerson@redhat.com>
Wed, 27 Nov 2024 22:14:19 +0000 (17:14 -0500)
committerAdam Emerson <aemerson@redhat.com>
Fri, 10 Jan 2025 20:27:15 +0000 (15:27 -0500)
Fixes: https://tracker.ceph.com/issues/69240
Signed-off-by: Adam Emerson <aemerson@redhat.com>
src/os/bluestore/BlueStore.cc

index a024a0c2105abf390d3ceceb20a7d6ea5b3d75da..05142ebb7d304e86d8e6aacb9115ad3f84a65619 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <bit>
+#include <utility>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -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();
     }