File 3012-32bit-fixes.patch of Package ceph-ceph-19.2.3
diff --git a/src/SimpleRADOSStriper.cc b/src/SimpleRADOSStriper.cc
index aa47d81..550c54c 100644
--- a/src/SimpleRADOSStriper.cc
+++ b/src/SimpleRADOSStriper.cc
@@ -140,7 +140,7 @@ int SimpleRADOSStriper::remove()
return 0;
}
-int SimpleRADOSStriper::truncate(uint64_t size)
+int SimpleRADOSStriper::truncate(size_t size)
{
d(5) << size << dendl;
diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc
index c455750..598ee63 100644
--- a/src/os/bluestore/BlueFS.cc
+++ b/src/os/bluestore/BlueFS.cc
@@ -4876,11 +4876,11 @@ void BlueFS::_check_vselector_LNF() {
size_t BlueFS::probe_alloc_avail(int dev, uint64_t alloc_size)
{
- size_t total = 0;
- auto iterated_allocation = [&](size_t off, size_t len) {
+ uint64_t total = 0;
+ auto iterated_allocation = [&](uint64_t off, uint64_t len) {
//only count in size that is alloc_size aligned
- size_t dist_to_alignment;
- size_t offset_in_block = off & (alloc_size - 1);
+ uint64_t dist_to_alignment;
+ uint64_t offset_in_block = off & (alloc_size - 1);
if (offset_in_block == 0)
dist_to_alignment = 0;
else
diff --git a/src/tools/cephfs_mirror/FSMirror.cc b/src/tools/cephfs_mirror/FSMirror.cc
index ea1857b..be3685b 100644
--- a/src/tools/cephfs_mirror/FSMirror.cc
+++ b/src/tools/cephfs_mirror/FSMirror.cc
@@ -377,7 +377,7 @@ void FSMirror::handle_acquire_directory(string_view dir_path) {
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());
+ static_cast<uint64_t>(m_directories.size()));
for (auto &[peer, peer_replayer] : m_peer_replayers) {
dout(10) << ": peer=" << peer << dendl;
@@ -398,7 +398,7 @@ void FSMirror::handle_release_directory(string_view dir_path) {
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());
+ static_cast<uint64_t>(m_directories.size()));
for (auto &[peer, peer_replayer] : m_peer_replayers) {
dout(10) << ": peer=" << peer << dendl;
peer_replayer->remove_directory(dir_path);
diff --git a/src/tools/neorados.cc b/src/tools/neorados.cc
index 731ffdd..efa2afe 100644
--- a/src/tools/neorados.cc
+++ b/src/tools/neorados.cc
@@ -149,7 +149,7 @@ ba::awaitable<void> create(R::RADOS& r, const std::vector<std::string>& p)
co_return;
}
-inline constexpr std::size_t io_size = 4 << 20;
+inline constexpr std::uint64_t io_size = 4 << 20;
ba::awaitable<void> write(R::RADOS& r, const std::vector<std::string>& p)
{
@@ -159,7 +159,7 @@ ba::awaitable<void> write(R::RADOS& r, const std::vector<std::string>& p)
bs::error_code ec;
std::unique_ptr<char[]> buf = std::make_unique<char[]>(io_size);
- std::size_t off = 0;
+ std::uint64_t off = 0;
boost::io::ios_exception_saver ies(std::cin);
std::cin.exceptions(std::istream::badbit);
@@ -208,7 +208,7 @@ ba::awaitable<void> read(R::RADOS& r, const std::vector<std::string>& p)
obj, pname));
}
- std::size_t off = 0;
+ std::uint64_t off = 0;
ceph::buffer::list bl;
while (auto toread = std::min(len - off, io_size)) {
R::ReadOp op;
diff --git a/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc b/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
index 67eaa97..4d422f3 100644
--- a/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
+++ b/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
@@ -255,7 +255,8 @@ bool Replayer<I>::get_replay_status(std::string* description,
json_spirit::mObject root_obj;
root_obj["replay_state"] = replay_state;
- root_obj["remote_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
+ root_obj["remote_snapshot_timestamp"] = static_cast<uint64_t>(
+ remote_snap_info->timestamp.sec());
if (m_perf_counters) {
m_perf_counters->tset(l_rbd_mirror_snapshot_remote_timestamp,
remote_snap_info->timestamp);
@@ -273,8 +274,8 @@ bool Replayer<I>::get_replay_status(std::string* description,
// use the timestamp from the matching remote image since
// the local snapshot would just be the time the snapshot was
// synced and not the consistency point in time.
- root_obj["local_snapshot_timestamp"] =
- matching_remote_snap_it->second.timestamp.sec();
+ root_obj["local_snapshot_timestamp"] = static_cast<uint64_t>(
+ matching_remote_snap_it->second.timestamp.sec());
if (m_perf_counters) {
m_perf_counters->tset(l_rbd_mirror_snapshot_local_timestamp,
matching_remote_snap_it->second.timestamp);
@@ -286,7 +287,8 @@ bool Replayer<I>::get_replay_status(std::string* description,
if (m_remote_snap_id_end != CEPH_NOSNAP &&
matching_remote_snap_it !=
m_state_builder->remote_image_ctx->snap_info.end()) {
- root_obj["syncing_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
+ root_obj["syncing_snapshot_timestamp"] = static_cast<uint64_t>(
+ remote_snap_info->timestamp.sec());
if (m_local_object_count > 0) {
root_obj["syncing_percent"] =