[packages/ceph/DEVEL-13] - started update to 13.x (13.2.10) - updated boost,rocksdb,tcmalloc,types patches - WIP, need to upd

qboosh qboosh at pld-linux.org
Wed Oct 13 09:02:56 CEST 2021


commit f7926bf0057437b4fadeaa954174c02ae904dfc8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Oct 13 09:07:45 2021 +0200

    - started update to 13.x (13.2.10)
    - updated boost,rocksdb,tcmalloc,types patches
    - WIP, need to update dependencies

 boost.patch         |  42 ++-----------------
 ceph-rocksdb.patch  |  71 ++++++++------------------------
 ceph-tcmalloc.patch |  26 ++++++------
 ceph-types.patch    | 116 ++++++++++++++++++++++++++++++++++------------------
 ceph.spec           |  68 +++++++++++++++++++++++-------
 5 files changed, 165 insertions(+), 158 deletions(-)
---
diff --git a/ceph.spec b/ceph.spec
index 7d7e705..37180b1 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -2,12 +2,15 @@
 # - proper init scripts if non-systemd boot is too be supported
 #   (upstream scripts seem overcomplicated and hardly useful)
 # - run as non-root user
+# - build selinux policy (-DWITH_SELINUX=ON)
+# - package sphinx docs (from doc/)
 #
 # Note on versioning: http://docs.ceph.com/docs/master/releases/
 #
 # Conditional build:
 %bcond_without	java		# Java binding
 %bcond_with	accelio		# Accelio transport support [needs update for internal API changes]
+%bcond_with	angular		# Angular-based mgr/dashboard frontend (built using npm, too outdated currently)
 %bcond_with	cryptopp	# use cryptopp instead of NSS crypto/SSL
 %bcond_with	dpdk		# DPDK messaging (requires cryptopp instead of nss)
 %bcond_without	fcgi		# RADOS Gateway FCGI frontend
@@ -34,12 +37,12 @@
 Summary:	User space components of the Ceph file system
 Summary(pl.UTF-8):	Działające w przestrzeni użytkownika elementy systemu plików Ceph
 Name:		ceph
-Version:	12.2.13
-Release:	7
+Version:	13.2.10
+Release:	1
 License:	LGPL v2.1 (libraries), GPL v2 (some programs)
 Group:		Base
 Source0:	http://download.ceph.com/tarballs/%{name}-%{version}.tar.gz
-# Source0-md5:	38bd01cf8224c9ca081298e19ab6e5a1
+# Source0-md5:	4dfcd8bf2cbbc90ac3bc70cbb2992fa9
 Source1:	ceph.sysconfig
 Source3:	ceph.tmpfiles
 Patch0:		%{name}-init-fix.patch
@@ -81,13 +84,14 @@ BuildRequires:	libfuse-devel
 %{?with_accelio:BuildRequires:	libibverbs-devel}
 BuildRequires:	libltdl-devel
 %{?with_accelio:BuildRequires:	librdmacm-devel}
-BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	libstdc++-devel >= 6:7
 %{?with_tcmalloc:BuildRequires:	libtcmalloc-devel}
 BuildRequires:	libtool >= 2:1.5
 BuildRequires:	libuuid-devel
 BuildRequires:	libxml2-devel >= 2.0
 %{?with_lttng:BuildRequires:	lttng-ust-devel}
 BuildRequires:	lz4-devel >= 1:1.7
+%{?with_angular:BuildRequires:	npm}
 %{!?with_cryptopp:BuildRequires:	nss-devel >= 3}
 BuildRequires:	openldap-devel
 BuildRequires:	openssl-devel
@@ -159,7 +163,7 @@ Requires:	nss-devel >= 3
 Requires:	leveldb-devel
 Requires:	libatomic_ops
 Requires:	libblkid-devel >= 2.17
-Requires:	libstdc++-devel >= 6:4.7
+Requires:	libstdc++-devel >= 6:7
 Requires:	libuuid-devel
 %{?with_lttng:Requires:	lttng-ust-devel}
 Requires:	openldap-devel
@@ -294,10 +298,25 @@ uruchamiania demonów.
 %patch10 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' \
-	src/{ceph-create-keys,ceph-rest-api,mount.fuse.ceph} \
-	src/brag/client/ceph-brag \
+	src/{ceph-create-keys,mount.fuse.ceph} \
 	src/ceph-disk/ceph_disk/main.py
 
+%{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \
+	src/{ceph-post-file.in,rbd-replay-many,rbdmap}
+
+%if %{with angular}
+# stub virtualenv with npm for src/pybind/mgr/dashboard bootstrapping
+install -d build/src/pybind/mgr/dashboard/node-env/bin
+ln -sf /usr/bin/npm build/src/pybind/mgr/dashboard/node-env/bin/npm
+cat >build/src/pybind/mgr/dashboard/node-env/bin/activate <<EOF
+deactivate() {
+    unset -f deactivate
+}
+EOF
+# 4.11.0 no longer downloadable, adjust to nearest existing
+%{__sed} -i -e '/"node-sass"/ s/4\.11\.0/4.13.1/' src/pybind/mgr/dashboard/frontend/package-lock.json
+%endif
+
 %build
 install -d build
 cd build
@@ -312,6 +331,7 @@ cd build
 	%{?with_fio:-DWITH_FIO=ON} \
 	%{!?with_lttng:-DWITH_LTTNG=OFF} \
 	-DWITH_LZ4=ON \
+	%{!?with_angular:-DWITH_MGR_DASHBOARD_FRONTEND=OFF} \
 	%{?with_cryptopp:-DWITH_NSS=OFF} \
 	-DWITH_OCF=ON \
 	%{?with_pmem:-DWITH_PMEM=ON} \
@@ -324,6 +344,13 @@ cd build
 	%{?with_zfs:-DWITH_ZFS=ON} \
 	-DWITH_REENTRANT_STRSIGNAL=ON \
 	%{!?with_tests:-DWITH_TESTS=OFF}
+#	-DWITH_MANPAGE=ON \
+#	-DWITH_PYTHON2=ON \
+#	-DWITH_PYTHON3=ON \
+
+# required by xfs headers (for off64_t)
+#CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
+
 
 %{__make}
 
@@ -361,7 +388,10 @@ cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ceph.conf
 # packaged as %doc
 %{__rm} $RPM_BUILD_ROOT%{_docdir}/sample.ceph.conf
 # cleanup
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/ceph/mgr/{.gitignore,dashboard/HACKING.rst,dashboard/static/AdminLTE-2.3.7/{.gitignore,.jshintrc,README.md}}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ceph/mgr/dashboard/HACKING.rst
+%if %{with angular}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ceph/mgr/{.gitignore,dashboard/static/AdminLTE-2.3.7/{.gitignore,.jshintrc,README.md}}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -392,12 +422,13 @@ fi
 %files
 %defattr(644,root,root,755)
 # COPYING specifies licenses of individual parts
-%doc AUTHORS COPYING PendingReleaseNotes README.md src/sample.ceph.conf doc/{release-notes,releases}.rst
+%doc AUTHORS COPYING PendingReleaseNotes README.md src/sample.ceph.conf doc/releases
 %attr(754,root,root) /etc/rc.d/init.d/ceph
 %config(noreplace) /etc/sysconfig/ceph
 %dir /etc/systemd/system/ceph.target.wants
 %{systemdunitdir}/ceph.service
 %{systemdunitdir}/ceph.target
+%{systemdunitdir}/ceph-crash.service
 %{systemdunitdir}/ceph-disk at .service
 %{systemdunitdir}/ceph-fuse.target
 %{systemdunitdir}/ceph-fuse at .service
@@ -418,20 +449,21 @@ fi
 %attr(755,root,root) %{_bindir}/ceph
 %attr(755,root,root) %{_bindir}/ceph-authtool
 %attr(755,root,root) %{_bindir}/ceph-bluestore-tool
-%attr(755,root,root) %{_bindir}/ceph-brag
 %attr(755,root,root) %{_bindir}/ceph-clsinfo
 %attr(755,root,root) %{_bindir}/ceph-conf
-%attr(755,root,root) %{_bindir}/ceph-crush-location
+%attr(755,root,root) %{_bindir}/ceph-crash
 %attr(755,root,root) %{_bindir}/ceph-dencoder
 %attr(755,root,root) %{_bindir}/ceph-detect-init
+%attr(755,root,root) %{_bindir}/ceph-kvstore-tool
 %attr(755,root,root) %{_bindir}/ceph-mds
 %attr(755,root,root) %{_bindir}/ceph-mgr
 %attr(755,root,root) %{_bindir}/ceph-mon
+%attr(755,root,root) %{_bindir}/ceph-monstore-tool
 %attr(755,root,root) %{_bindir}/ceph-objectstore-tool
 %attr(755,root,root) %{_bindir}/ceph-osd
+%attr(755,root,root) %{_bindir}/ceph-osdomap-tool
 %attr(755,root,root) %{_bindir}/ceph-post-file
 %attr(755,root,root) %{_bindir}/ceph-rbdnamer
-%attr(755,root,root) %{_bindir}/ceph-rest-api
 %attr(755,root,root) %{_bindir}/ceph-run
 %attr(755,root,root) %{_bindir}/ceph-syn
 %attr(755,root,root) %{_bindir}/cephfs-data-scan
@@ -500,6 +532,7 @@ fi
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_log.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_lua.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_numops.so*
+%attr(755,root,root) %{_libdir}/rados-classes/libcls_otp.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_rbd.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_refcount.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_replica_log.so*
@@ -524,12 +557,12 @@ fi
 %{_mandir}/man8/ceph-deploy.8*
 %{_mandir}/man8/ceph-detect-init.8*
 %{_mandir}/man8/ceph-disk.8*
+%{_mandir}/man8/ceph-kvstore-tool.8*
 %{_mandir}/man8/ceph-mds.8*
 %{_mandir}/man8/ceph-mon.8*
 %{_mandir}/man8/ceph-osd.8*
 %{_mandir}/man8/ceph-post-file.8*
 %{_mandir}/man8/ceph-rbdnamer.8*
-%{_mandir}/man8/ceph-rest-api.8*
 %{_mandir}/man8/ceph-run.8*
 %{_mandir}/man8/ceph-syn.8*
 %{_mandir}/man8/ceph-volume.8*
@@ -583,6 +616,10 @@ fi
 %attr(755,root,root) %ghost %{_libdir}/librbd_tp.so.1
 %attr(755,root,root) %{_libdir}/librgw.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/librgw.so.2
+%attr(755,root,root) %{_libdir}/librgw_op_tp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/librgw_op_tp.so.1
+%attr(755,root,root) %{_libdir}/librgw_rados_tp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/librgw_rados_tp.so.1
 %dir %{_libdir}/ceph
 %attr(755,root,root) %{_libdir}/ceph/libceph-common.so.0
 
@@ -597,6 +634,8 @@ fi
 %attr(755,root,root) %{_libdir}/librbd.so
 %attr(755,root,root) %{_libdir}/librbd_tp.so
 %attr(755,root,root) %{_libdir}/librgw.so
+%attr(755,root,root) %{_libdir}/librgw_op_tp.so
+%attr(755,root,root) %{_libdir}/librgw_rados_tp.so
 %attr(755,root,root) %{_libdir}/ceph/libceph-common.so
 %{_includedir}/cephfs
 %{_includedir}/rados
@@ -621,9 +660,9 @@ fi
 %{py_sitedir}/rgw-2.0.0-py*.egg-info
 %{py_sitescriptdir}/ceph_argparse.py[co]
 %{py_sitescriptdir}/ceph_daemon.py[co]
-%{py_sitescriptdir}/ceph_rest_api.py[co]
 %{py_sitescriptdir}/ceph_volume_client.py[co]
 
+%if 0
 %files -n python3-ceph
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py3_sitedir}/cephfs.cpython-*.so
@@ -640,6 +679,7 @@ fi
 %{py3_sitescriptdir}/__pycache__/ceph_argparse.cpython-*.py[co]
 %{py3_sitescriptdir}/__pycache__/ceph_daemon.cpython-*.py[co]
 %{py3_sitescriptdir}/__pycache__/ceph_volume_client.cpython-*.py[co]
+%endif
 
 %if %{with java}
 %files -n java-cephfs
diff --git a/boost.patch b/boost.patch
index af61e2f..eed9f24 100644
--- a/boost.patch
+++ b/boost.patch
@@ -1,16 +1,3 @@
-Regressed by https://github.com/boostorg/date_time/commit/f9f2aaf5216c
-
-src/rbd_replay/Replayer.cc:353:65: error: no matching conversion for functional-style cast from 'float' to 'boost::posix_time::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
-    boost::system_time sub_release_time(action_completed_time + boost::posix_time::microseconds(dep.time_delta * m_latency_multiplier / 1000));
-                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'float' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
-  class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
-                             ^
-/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'float' to 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
-/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = float]
-                                typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
-                                                          ^
-
 src/test/librbd/test_mock_Journal.cc:485:42: error: reference to '_1' is ambiguous
       std::bind(&invoke_replay_complete, _1, 0));
                                          ^
@@ -21,27 +8,6 @@ BOOST_STATIC_CONSTEXPR boost::arg<1> _1;
 constexpr __ph<1>   _1{};
                     ^
 
---- src/rbd_replay/Replayer.cc.orig	2018-02-26 21:47:18 UTC
-+++ src/rbd_replay/Replayer.cc
-@@ -350,7 +350,7 @@ void Replayer::wait_for_actions(const action::Dependen
-     dout(DEPGRAPH_LEVEL) << "Finished waiting for " << dep.id << " after " << micros << " microseconds" << dendl;
-     // Apparently the nanoseconds constructor is optional:
-     // http://www.boost.org/doc/libs/1_46_0/doc/html/date_time/details.html#compile_options
--    boost::system_time sub_release_time(action_completed_time + boost::posix_time::microseconds(dep.time_delta * m_latency_multiplier / 1000));
-+    boost::system_time sub_release_time(action_completed_time + boost::posix_time::microseconds(long(dep.time_delta * m_latency_multiplier / 1000)));
-     if (sub_release_time > release_time) {
-       release_time = sub_release_time;
-     }
---- src/mon/MDSMonitor.cc.orig	2020-05-28 07:26:02.363159480 +0200
-+++ src/mon/MDSMonitor.cc	2020-05-28 07:28:02.559174989 +0200
-@@ -15,6 +15,7 @@
- #include <sstream>
- #include <boost/utility.hpp>
- #include <boost/regex.hpp>
-+#include <boost/next_prior.hpp>
- 
- #include "MDSMonitor.h"
- #include "FSCommands.h"
 --- CMakeLists.txt.orig	2020-01-30 21:52:36.000000000 +0100
 +++ CMakeLists.txt	2020-05-28 16:50:46.412927163 +0200
 @@ -563,7 +563,7 @@
@@ -57,10 +23,10 @@ constexpr __ph<1>   _1{};
 +++ src/CMakeLists.txt	2020-05-28 20:58:47.848974172 +0200
 @@ -722,7 +722,7 @@
                   $<TARGET_OBJECTS:heap_profiler_objs>)
-   target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
-   target_link_libraries(ceph-mgr osdc client global-static common
--      Boost::python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
-+      Boost::python27 ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
+   target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}")
+   target_link_libraries(ceph-mgr osdc client global-static ceph-common
+-      Boost::python ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
++      Boost::python27 ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
    install(TARGETS ceph-mgr DESTINATION bin)
  endif (WITH_MGR)
  
diff --git a/ceph-rocksdb.patch b/ceph-rocksdb.patch
index edb5f18..0ad4fad 100644
--- a/ceph-rocksdb.patch
+++ b/ceph-rocksdb.patch
@@ -1,56 +1,17 @@
---- ceph-12.2.13/src/kv/RocksDBStore.cc.orig	2020-01-30 21:52:36.000000000 +0100
-+++ ceph-12.2.13/src/kv/RocksDBStore.cc	2020-05-28 18:54:37.329337101 +0200
-@@ -522,7 +522,7 @@
-   // considering performance overhead, default is disabled
-   if (g_conf->rocksdb_perf) {
-     rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex);
--    rocksdb::perf_context.Reset();
-+    rocksdb::get_perf_context()->Reset();
-   }
+--- ceph-13.2.10/cmake/modules/Findrocksdb.cmake.orig	2020-04-23 18:32:31.000000000 +0200
++++ ceph-13.2.10/cmake/modules/Findrocksdb.cmake	2021-09-01 19:16:45.860546871 +0200
+@@ -15,11 +15,11 @@ find_library(ROCKSDB_LIBRARIES rocksdb)
  
-   RocksDBTransactionImpl * _t =
-@@ -549,13 +549,13 @@
-     utime_t write_wal_time;
-     utime_t write_pre_and_post_process_time;
-     write_wal_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000);
-     write_memtable_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000);
-     write_delay_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000);
-     write_pre_and_post_process_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000);
-     logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time);
-     logger->tinc(l_rocksdb_write_delay_time, write_delay_time);
-     logger->tinc(l_rocksdb_write_wal_time, write_wal_time);
-@@ -575,7 +575,7 @@
-   // considering performance overhead, default is disabled
-   if (g_conf->rocksdb_perf) {
-     rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex);
--    rocksdb::perf_context.Reset();
-+    rocksdb::get_perf_context()->Reset();
-   }
- 
-   RocksDBTransactionImpl * _t =
-@@ -603,13 +603,13 @@
-     utime_t write_wal_time;
-     utime_t write_pre_and_post_process_time;
-     write_wal_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000);
-     write_memtable_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000);
-     write_delay_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000);
-     write_pre_and_post_process_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000);
-     logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time);
-     logger->tinc(l_rocksdb_write_delay_time, write_delay_time);
-     logger->tinc(l_rocksdb_write_wal_time, write_wal_time);
+ if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
+   foreach(ver "MAJOR" "MINOR" "PATCH")
+-    file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE
++    file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE
+       REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$")
+     string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$"
+-      "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}")
+-    unset(${ROCKDB_VER_${ver}_LINE})
++      "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}")
++    unset(ROCKDB_VER_${ver}_LINE)
+   endforeach()
+   set(ROCKSDB_VERSION_STRING
+     "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}")
diff --git a/ceph-tcmalloc.patch b/ceph-tcmalloc.patch
index 0ac0da5..c450dd2 100644
--- a/ceph-tcmalloc.patch
+++ b/ceph-tcmalloc.patch
@@ -1,19 +1,21 @@
---- ceph-12.2.13/cmake/modules/Findgperftools.cmake.orig	2020-01-30 21:52:36.000000000 +0100
-+++ ceph-12.2.13/cmake/modules/Findgperftools.cmake	2020-05-28 17:05:49.948032294 +0200
-@@ -11,13 +11,13 @@
- find_path(GPERFTOOLS_INCLUDE_DIR gperftools/profiler.h)
- find_path(Tcmalloc_INCLUDE_DIR gperftools/tcmalloc.h)
+--- ceph-13.2.10/cmake/modules/Findgperftools.cmake.orig	2020-01-30 21:52:36.000000000 +0100
++++ ceph-13.2.10/cmake/modules/Findgperftools.cmake	2020-05-28 17:05:49.948032294 +0200
+@@ -31,7 +31,7 @@ if(Tcmalloc_INCLUDE_DIR AND EXISTS "${Tc
+   endif()
+ endif()
  
 -foreach(component tcmalloc tcmalloc_minimal profiler)
 +foreach(component tcmalloc tcmalloc_minimal)
    string(TOUPPER ${component} COMPONENT)
-   find_library(GPERFTOOLS_${COMPONENT}_LIBRARY ${component})
-   list(APPEND GPERFTOOLS_LIBRARIES GPERFTOOLS_${COMPONENT}_LIBRARY)
- endforeach()
+   find_library(GPERFTOOLS_${COMPONENT}_LIBRARY ${component}
+     HINTS $ENV{GPERF_ROOT}/lib)
+@@ -40,7 +40,7 @@ endforeach()
  
  include(FindPackageHandleStandardArgs)
--find_package_handle_standard_args(gperftools DEFAULT_MSG GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR)
-+find_package_handle_standard_args(gperftools DEFAULT_MSG GPERFTOOLS_LIBRARIES Tcmalloc_INCLUDE_DIR)
+ find_package_handle_standard_args(gperftools
+-  REQUIRED_VARS ${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR
++  REQUIRED_VARS ${GPERFTOOLS_LIBRARIES} Tcmalloc_INCLUDE_DIR
+   VERSION_VAR TCMALLOC_VERSION_STRING)
  
--mark_as_advanced(GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR)
-+mark_as_advanced(GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR Tcmalloc_INCLUDE_DIR)
+-mark_as_advanced(${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR)
++mark_as_advanced(${GPERFTOOLS_LIBRARIES} Tcmalloc_INCLUDE_DIR)
diff --git a/ceph-types.patch b/ceph-types.patch
index 8d0b063..a0bbcca 100644
--- a/ceph-types.patch
+++ b/ceph-types.patch
@@ -5,7 +5,7 @@
        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(static_cast<uint64_t>(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) {
@@ -14,41 +14,12 @@
      dout(10) << __func__ << " approx pg log length =  "
               << pg_log.get_log().approx_size() << dendl;
 -    size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
-+    size_t num_to_trim = std::min(static_cast<uint64_t>(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);
      dout(10) << __func__ << " num_to_trim =  " << num_to_trim << dendl;
      if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
---- ceph-12.2.13/src/os/filestore/FileStore.h.orig	2020-01-30 21:52:36.000000000 +0100
-+++ ceph-12.2.13/src/os/filestore/FileStore.h	2020-06-03 14:29:43.325143770 +0200
-@@ -57,7 +57,7 @@
- 
- #if defined(__linux__)
- # ifndef BTRFS_SUPER_MAGIC
--#define BTRFS_SUPER_MAGIC 0x9123683EL
-+#define BTRFS_SUPER_MAGIC 0x9123683EUL
- # endif
- # ifndef XFS_SUPER_MAGIC
- #define XFS_SUPER_MAGIC 0x58465342L
 --- ceph-12.2.13/src/os/filestore/FileStore.cc.orig	2020-01-30 21:52:36.000000000 +0100
 +++ ceph-12.2.13/src/os/filestore/FileStore.cc	2020-06-03 21:27:26.387210803 +0200
-@@ -779,7 +779,7 @@
- 
- FileStoreBackend *FileStoreBackend::create(long f_type, FileStore *fs)
- {
--  switch (f_type) {
-+  switch (static_cast<uint32_t>(f_type)) {
- #if defined(__linux__)
-   case BTRFS_SUPER_MAGIC:
-     return new BtrfsFileStoreBackend(fs);
-@@ -808,7 +808,7 @@
- 	  << " (magic 0x" << std::hex << f_type << std::dec << ")"
- 	  << dendl;
- 
--  switch (f_type) {
-+  switch (static_cast<uint32_t>(f_type)) {
- #if defined(__linux__)
-   case BTRFS_SUPER_MAGIC:
-     if (!m_disable_wbthrottle){
 @@ -922,7 +922,7 @@
    }
  
@@ -67,12 +38,79 @@
        !g_ceph_context->check_experimental_feature_enabled("btrfs")) {
      derr <<__FUNC__ << ": deprecated btrfs support is not enabled" << dendl;
      return -EPERM;
-@@ -5949,7 +5949,7 @@
-   uint32_t fs_xattrs;
-   uint32_t fs_xattr_max_value_size;
+--- ceph-13.2.10/src/mon/OSDMonitor.cc.orig	2020-04-23 18:32:31.000000000 +0200
++++ ceph-13.2.10/src/mon/OSDMonitor.cc	2021-09-20 20:03:13.672134022 +0200
+@@ -820,7 +820,7 @@ OSDMonitor::update_pending_pgs(const OSD
+ 	     << " modified " << p->second.modified
+ 	     << " [" << p->second.start << "-" << p->second.end << ")"
+ 	     << dendl;
+-    int n = std::min(max - pending_creatings.pgs.size(),
++    int n = std::min<uint64_t>(max - pending_creatings.pgs.size(),
+ 		p->second.end - p->second.start);
+     ps_t first = p->second.start;
+     ps_t end = first + n;
+--- ceph-13.2.10/src/os/bluestore/BlueStore.cc.orig	2020-04-23 18:32:31.000000000 +0200
++++ ceph-13.2.10/src/os/bluestore/BlueStore.cc	2021-09-20 20:34:23.352005097 +0200
+@@ -12614,7 +12614,7 @@ size_t BlueStoreRepairer::StoreSpaceTrac
+     if (e.second == 0) {
+       continue;
+     }
+-    size_t pos = max(e.first / granularity, prev_pos);
++    size_t pos = max<uint64_t>(e.first / granularity, prev_pos);
+     size_t end_pos = 1 + (e.first + e.second - 1) / granularity;
+     while (pos != npos && pos < end_pos)  {
+         ceph_assert( collections_bfs[pos].element_count() ==
+--- ceph-13.2.10/src/rgw/rgw_client_io_filters.h.orig	2020-04-23 18:32:31.000000000 +0200
++++ ceph-13.2.10/src/rgw/rgw_client_io_filters.h	2021-09-22 17:02:54.573378159 +0200
+@@ -291,7 +291,7 @@ public:
+       // extensions/trailing headers.
+       char chunk_size[32];
+       const auto chunk_size_len = snprintf(chunk_size, sizeof(chunk_size),
+-                                           "%" PRIx64 "\r\n", len);
++                                           "%zx\r\n", len);
+       size_t sent = 0;
  
--  switch (m_fs_type) {
-+  switch (static_cast<uint32_t>(m_fs_type)) {
- #if defined(__linux__)
-   case XFS_SUPER_MAGIC:
-     fs_xattr_size = cct->_conf->filestore_max_inline_xattr_size_xfs;
+       sent += DecoratedRestfulClient<T>::send_body(chunk_size, chunk_size_len);
+--- ceph-13.2.10/src/rgw/rgw_rest_swift.cc.orig	2020-04-23 18:32:31.000000000 +0200
++++ ceph-13.2.10/src/rgw/rgw_rest_swift.cc	2021-09-22 17:04:01.473340779 +0200
+@@ -726,7 +726,7 @@ static inline int handle_metadata_errors
+   } else if (op_ret == -E2BIG) {
+     const auto error_message = boost::str(
+       boost::format("Too many metadata items; max %lld")
+-        % s->cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req"));
++        % s->cct->_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req"));
+     set_req_state_err(s, EINVAL, error_message);
+     return -EINVAL;
+   }
+@@ -1781,7 +1781,7 @@ void RGWInfo_ObjStore_SWIFT::list_swift_
+   formatter.dump_string("version", ceph_version);
+ 
+   const size_t max_attr_name_len = \
+-    g_conf->get_val<size_t>("rgw_max_attr_name_len");
++    g_conf->get_val<Option::size_t>("rgw_max_attr_name_len");
+   if (max_attr_name_len) {
+     const size_t meta_name_limit = \
+       max_attr_name_len - strlen(RGW_ATTR_PREFIX RGW_AMZ_META_PREFIX);
+@@ -1794,7 +1794,7 @@ void RGWInfo_ObjStore_SWIFT::list_swift_
+   }
+ 
+   const size_t meta_num_limit = \
+-    g_conf->get_val<size_t>("rgw_max_attrs_num_in_req");
++    g_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req");
+   if (meta_num_limit) {
+     formatter.dump_int("max_meta_count", meta_num_limit);
+   }
+--- ceph-13.2.10/src/common/ceph_context.h.orig	2020-04-23 18:32:31.000000000 +0200
++++ ceph-13.2.10/src/common/ceph_context.h	2021-09-23 06:29:21.645156177 +0200
+@@ -144,7 +144,11 @@ public:
+   void do_command(std::string_view command, const cmdmap_t& cmdmap,
+ 		  std::string_view format, ceph::bufferlist *out);
+ 
++#ifdef __LP64__
+   static constexpr std::size_t largest_singleton = sizeof(void*) * 72;
++#else
++  static constexpr std::size_t largest_singleton = sizeof(void*) * 96;
++#endif
+ 
+   template<typename T, typename... Args>
+   T& lookup_or_create_singleton_object(std::string_view name,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ceph.git/commitdiff/f7926bf0057437b4fadeaa954174c02ae904dfc8



More information about the pld-cvs-commit mailing list