[packages/ceph] - fix incorrect types overrides - widen type for x32
baggins
baggins at pld-linux.org
Sat Feb 12 22:52:53 CET 2022
commit c8d4a223b721c5d84809646df85ba58ea8dc1b95
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Feb 12 22:51:35 2022 +0100
- fix incorrect types overrides
- widen type for x32
ceph.spec | 11 ++++----
types.patch | 30 ++++++++++++++++++++++
x32.patch | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 121 insertions(+), 5 deletions(-)
---
diff --git a/ceph.spec b/ceph.spec
index a9095a8..80e8def 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -48,6 +48,8 @@ Patch2: %{name}-fcgi.patch
Patch3: string-includes.patch
Patch4: no-virtualenvs.patch
Patch5: system-zstd.patch
+Patch6: types.patch
+Patch7: x32.patch
URL: https://ceph.io/
%{?with_accelio:BuildRequires: accelio-devel}
%{?with_babeltrace:BuildRequires: babeltrace-devel}
@@ -273,11 +275,10 @@ uruchamiania demonów.
%patch3 -p1
%patch4 -p1
%patch5 -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-disk/ceph_disk/main.py
+%patch6 -p1
+%ifarch x32
+%patch7 -p1
+%endif
%build
install -d build
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..42f061c
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,30 @@
+--- ceph-16.2.7/src/log/LogClock.h~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/log/LogClock.h 2022-02-12 18:57:04.434978131 +0100
+@@ -8,14 +8,11 @@
+ #include <chrono>
+ #include <ctime>
+ #include <sys/time.h>
++#include <sys/types.h>
+
+ #include "include/ceph_assert.h"
+ #include "common/ceph_time.h"
+
+-#ifndef suseconds_t
+-typedef long suseconds_t;
+-#endif
+-
+ namespace ceph {
+ namespace logging {
+ namespace _logclock {
+ new_back->set_length(0); // unused, so far.
+--- ceph-16.2.7/src/SimpleRADOSStriper.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/SimpleRADOSStriper.cc 2022-02-12 21:59:28.261721940 +0100
+@@ -140,7 +140,7 @@
+ return 0;
+ }
+
+-int SimpleRADOSStriper::truncate(uint64_t size)
++int SimpleRADOSStriper::truncate(size_t size)
+ {
+ d(5) << size << dendl;
+
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..cb6376b
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,85 @@
+--- ceph-16.2.7/src/common/buffer.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/common/buffer.cc 2022-02-12 19:45:24.576619502 +0100
+@@ -2272,7 +2272,7 @@
+
+ void ceph::buffer::list::page_aligned_appender::_refill(size_t len) {
+ const size_t alloc = \
+- std::max((size_t)min_alloc, (len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK);
++ std::max((size_t)min_alloc, (size_t)((len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK));
+ auto new_back = \
+ ptr_node::create(buffer::create_page_aligned(alloc));
+--- ceph-16.2.7/src/os/bluestore/BlueFS.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/os/bluestore/BlueFS.cc 2022-02-12 21:40:54.182516511 +0100
+@@ -3799,7 +3799,7 @@
+ if (dist_to_alignment >= len)
+ return;
+ len -= dist_to_alignment;
+- total += p2align(len, alloc_size);
++ total += p2align((uint64_t)len, alloc_size);
+ };
+ if (alloc[dev]) {
+ alloc[dev]->dump(iterated_allocation);
+--- ceph-16.2.7/src/s3select/include/s3select_functions.h~ 2020-06-23 03:08:18.000000000 +0200
++++ ceph-16.2.7/src/s3select/include/s3select_functions.h 2022-02-12 22:04:21.710093616 +0100
+@@ -585,7 +585,7 @@
+ {
+ boost::gregorian::date_period dp =
+ boost::gregorian::date_period( val_dt1.timestamp()->date(), val_dt2.timestamp()->date());
+- result->set_value( dp.length().days() );
++ result->set_value( (int64_t)dp.length().days() );
+ }
+ else if (strcmp(val_date_part.str(), "hours") == 0)
+ {
+--- ceph-16.2.7/src/librbd/object_map/DiffRequest.cc.orig 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/librbd/object_map/DiffRequest.cc 2022-02-12 22:17:55.163378523 +0100
+@@ -187,7 +187,7 @@
+ m_object_map.resize(m_object_diff_state->size());
+ }
+
+- uint64_t overlap = std::min(m_object_map.size(), prev_object_diff_state_size);
++ uint64_t overlap = std::min(m_object_map.size(), (uint64_t)prev_object_diff_state_size);
+ auto it = m_object_map.begin();
+ auto overlap_end_it = it + overlap;
+ auto diff_it = m_object_diff_state->begin();
+--- ceph-16.2.7/src/tools/neorados.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/tools/neorados.cc 2022-02-12 22:23:25.836643956 +0100
+@@ -205,7 +205,7 @@
+
+ std::size_t off = 0;
+ ceph::buffer::list bl;
+- while (auto toread = std::max(len - off, io_size)) {
++ while (auto toread = std::max(len - off, (uint64_t)io_size)) {
+ R::ReadOp op;
+ op.read(off, toread, &bl);
+ r.execute(obj, pool, std::move(op), nullptr, y[ec]);
+--- ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc 2022-02-12 22:28:42.717060249 +0100
+@@ -345,7 +345,7 @@
+ std::scoped_lock locker(m_lock);
+ m_directories.emplace(dir_path);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ (uint64_t)m_directories.size());
+
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+--- ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc.orig 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc 2022-02-12 22:30:46.487298972 +0100
+@@ -345,7 +345,7 @@
+ std::scoped_lock locker(m_lock);
+ m_directories.emplace(dir_path);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ (uint64_t)m_directories.size());
+
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+@@ -363,7 +363,7 @@
+ if (it != m_directories.end()) {
+ m_directories.erase(it);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ (uint64_t)m_directories.size());
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+ peer_replayer->remove_directory(dir_path);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ceph.git/commitdiff/c8d4a223b721c5d84809646df85ba58ea8dc1b95
More information about the pld-cvs-commit
mailing list