summaryrefslogtreecommitdiffstats
path: root/debian/patches/32bit-fixes.patch
blob: 1d2fcb6604f324ea0d72dedd179ccf6dc162f41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Description: Misc fixes for 32 bit architecture builds.
Author: James Page <james.page@ubuntu.com>
Forwarded: no

Index: ceph/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
===================================================================
--- ceph.orig/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
+++ ceph/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
@@ -253,7 +253,8 @@ bool Replayer<I>::get_replay_status(std:
 
   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());
 
   auto matching_remote_snap_id = util::compute_remote_snap_id(
     m_state_builder->local_image_ctx->image_lock,
@@ -267,8 +268,8 @@ bool Replayer<I>::get_replay_status(std:
     // 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());
   }
 
   matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find(
@@ -276,7 +277,8 @@ bool Replayer<I>::get_replay_status(std:
   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());
     root_obj["syncing_percent"] = static_cast<uint64_t>(
         100 * m_local_mirror_snap_ns.last_copied_object_number /
         static_cast<float>(std::max<uint64_t>(1U, m_local_object_count)));
Index: ceph/src/common/buffer.cc
===================================================================
--- ceph.orig/src/common/buffer.cc
+++ ceph/src/common/buffer.cc
@@ -2272,7 +2272,7 @@ MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::ra
 
 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));
   new_back->set_length(0);   // unused, so far.
Index: ceph/src/s3select/include/s3select_functions.h
===================================================================
--- ceph.orig/src/s3select/include/s3select_functions.h
+++ ceph/src/s3select/include/s3select_functions.h
@@ -585,7 +585,7 @@ struct _fn_diff_timestamp : public base_
     {
       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)
     {
Index: ceph/src/os/bluestore/BlueFS.cc
===================================================================
--- ceph.orig/src/os/bluestore/BlueFS.cc
+++ ceph/src/os/bluestore/BlueFS.cc
@@ -3831,11 +3831,11 @@ int BlueFS::do_replay_recovery_read(File
 
 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
Index: ceph/src/tools/neorados.cc
===================================================================
--- ceph.orig/src/tools/neorados.cc
+++ ceph/src/tools/neorados.cc
@@ -146,7 +146,7 @@ void create(R::RADOS& r, const std::vect
 			     obj, pname));
 }
 
-inline constexpr std::size_t io_size = 4 << 20;
+inline constexpr std::uint64_t io_size = 4 << 20;
 
 void write(R::RADOS& r, const std::vector<std::string>& p, s::yield_context y)
 {
@@ -156,7 +156,7 @@ void write(R::RADOS& r, const std::vecto
 
   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);
@@ -203,7 +203,7 @@ void read(R::RADOS& r, const std::vector
 		    obj, pname));
   }
 
-  std::size_t off = 0;
+  std::uint64_t off = 0;
   ceph::buffer::list bl;
   while (auto toread = std::max(len - off, io_size)) {
     R::ReadOp op;
Index: ceph/src/tools/cephfs_mirror/FSMirror.cc
===================================================================
--- ceph.orig/src/tools/cephfs_mirror/FSMirror.cc
+++ ceph/src/tools/cephfs_mirror/FSMirror.cc
@@ -345,7 +345,7 @@ void FSMirror::handle_acquire_directory(
     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;
@@ -363,7 +363,7 @@ void FSMirror::handle_release_directory(
     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);
Index: ceph/src/librbd/object_map/DiffRequest.cc
===================================================================
--- ceph.orig/src/librbd/object_map/DiffRequest.cc
+++ ceph/src/librbd/object_map/DiffRequest.cc
@@ -175,7 +175,7 @@ void DiffRequest<I>::handle_load_object_
     m_object_map.resize(num_objs);
   }
 
-  size_t prev_object_diff_state_size = m_object_diff_state->size();
+  uint64_t prev_object_diff_state_size = m_object_diff_state->size();
   if (prev_object_diff_state_size < num_objs) {
     // the diff state should be the largest of all snapshots in the set
     m_object_diff_state->resize(num_objs);
Index: ceph/src/SimpleRADOSStriper.cc
===================================================================
--- ceph.orig/src/SimpleRADOSStriper.cc
+++ ceph/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;