summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-cluster/ceph/ceph-12.2.11.ebuild1
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.11-fix-min-call.patch13
2 files changed, 14 insertions, 0 deletions
diff --git a/sys-cluster/ceph/ceph-12.2.11.ebuild b/sys-cluster/ceph/ceph-12.2.11.ebuild
index d828bc7be4f..761d8f53495 100644
--- a/sys-cluster/ceph/ceph-12.2.11.ebuild
+++ b/sys-cluster/ceph/ceph-12.2.11.ebuild
@@ -134,6 +134,7 @@ PATCHES=(
"${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
"${FILESDIR}/ceph-12.2.5-no-werror.patch"
"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+ "${FILESDIR}/ceph-12.2.11-fix-min-call.patch"
)
check-reqs_export_vars() {
diff --git a/sys-cluster/ceph/files/ceph-12.2.11-fix-min-call.patch b/sys-cluster/ceph/files/ceph-12.2.11-fix-min-call.patch
new file mode 100644
index 00000000000..cd9eb4891cb
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.11-fix-min-call.patch
@@ -0,0 +1,13 @@
+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) {