sys-cluster/ceph: Fix 12.2.11 compile fail on x86 (bug #679414)
authorPatrick McLean <patrick.mclean@sony.com>
Fri, 29 Mar 2019 02:22:17 +0000 (19:22 -0700)
committerPatrick McLean <chutzpah@gentoo.org>
Fri, 29 Mar 2019 02:22:17 +0000 (19:22 -0700)
Closes: https://bugs.gentoo.org/679414
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
sys-cluster/ceph/ceph-12.2.11.ebuild
sys-cluster/ceph/files/ceph-12.2.11-fix-min-call.patch [new file with mode: 0644]

index d828bc7be4f3a6e117e08c0af6e003cd9701b719..761d8f5349525611eea3f71a1f240e323ea2eaf0 100644 (file)
@@ -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 (file)
index 0000000..cd9eb48
--- /dev/null
@@ -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) {