You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-cluster/ceph/files/ceph-12.2.11-fix-min-call.p...

14 lines
692 B

diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc
index 0074c7964b..98991be7d2 100644
--- a/src/osd/PrimaryLogPG.cc
+++ b/src/osd/PrimaryLogPG.cc
@@ -1582,7 +1582,7 @@ void PrimaryLogPG::calc_trim_to()
if (limit != eversion_t() &&
limit != pg_trim_to &&
pg_log.get_log().approx_size() > target) {
- size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
+ size_t num_to_trim = std::min((uint64_t)(pg_log.get_log().approx_size() - target),
cct->_conf->osd_pg_log_trim_max);
if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
cct->_conf->osd_pg_log_trim_max >= cct->_conf->osd_pg_log_trim_min) {