aboutsummaryrefslogtreecommitdiffstats
path: root/community/ceph/30-32bit_fix.patch.noauto
blob: ece67f1d55908eaa409c18bb15da497993965f29 (plain) (blame)
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
165
166
167
168
169
170
171
172
173
174
175
diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Client.cc
--- ceph-15.2.4/src/client/Client.cc	2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/client/Client.cc	2020-11-21 22:11:16.061796876 +1030
@@ -10948,7 +10948,7 @@
   ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " -> " << in->ll_ref << dendl;
 }
 
-int Client::_ll_put(Inode *in, uint64_t num)
+int Client::_ll_put(Inode *in, size_t num)
 {
   in->ll_put(num);
   ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " " << num << " -> " << in->ll_ref << dendl;
@@ -10989,7 +10989,7 @@
   }
 }
 
-bool Client::_ll_forget(Inode *in, uint64_t count)
+bool Client::_ll_forget(Inode *in, size_t count)
 {
   inodeno_t ino = in->ino;
 
@@ -11018,7 +11018,7 @@
   return last;
 }
 
-bool Client::ll_forget(Inode *in, uint64_t count)
+bool Client::ll_forget(Inode *in, size_t count)
 {
   std::lock_guard lock(client_lock);
   return _ll_forget(in, count);
diff -uNr ceph-15.2.4/src/mds/PurgeQueue.h ceph-15.2.4-arm32_fix/src/mds/PurgeQueue.h
--- ceph-15.2.4/src/mds/PurgeQueue.h	2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/mds/PurgeQueue.h	2020-11-21 22:11:16.065796889 +1030
@@ -219,6 +219,6 @@
   size_t purge_item_journal_size;
 
   uint64_t ops_high_water = 0;
-  uint64_t files_high_water = 0;
+  size_t files_high_water = 0;
 };
 #endif
diff -uNr ceph-15.2.4/src/test/common/test_json_formattable.cc ceph-15.2.4-arm32_fix/src/test/common/test_json_formattable.cc
--- ceph-15.2.4/src/test/common/test_json_formattable.cc	2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/test/common/test_json_formattable.cc	2020-11-21 22:11:16.065796889 +1030
@@ -371,7 +371,7 @@
 
   struct2() {
     void *p = (void *)this;
-    long i = (long)p;
+    unsigned long i = (unsigned long)p;
     v.resize((i >> 16) % 16 + 1);
   }
 
diff -uNr ceph-15.2.4/src/test/libcephfs/ceph_pthread_self.h ceph-15.2.4-arm32_fix/src/test/libcephfs/ceph_pthread_self.h
--- ceph-15.2.4/src/test/libcephfs/ceph_pthread_self.h	2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/test/libcephfs/ceph_pthread_self.h	2020-11-21 22:11:16.066796893 +1030
@@ -25,7 +25,7 @@
   static_assert(std::is_convertible_v<decltype(me), uint64_t> ||
                 std::is_pointer_v<decltype(me)>,
                 "we need to use pthread_self() for the owner parameter");
-  return reinterpret_cast<uint64_t>(me);
+  return reinterpret_cast<uint64_t>((uint64_t) me);
 }
 
 #endif
diff -uNr ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc ceph-15.2.4-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc
--- ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc	2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc	2020-11-21 22:11:16.066796893 +1030
@@ -162,7 +162,7 @@
                          int r) {
     bufferlist bl;
     encode(last_image_id, bl);
-    encode(static_cast<size_t>(1024), bl);
+    encode(static_cast<uint64_t>(1024), bl);
 
     bufferlist out_bl;
     encode(images, out_bl);
diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc ceph-15.2.4-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
--- ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc	2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc	2020-11-21 22:11:16.066796893 +1030
@@ -234,7 +234,7 @@
 
   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"] = (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,
@@ -249,7 +249,7 @@
     // 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();
+      (uint64_t) matching_remote_snap_it->second.timestamp.sec();
   }
 
   matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find(
@@ -257,7 +257,7 @@
   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"] = (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)));
diff -Nurp a/src/librbd/object_map/DiffRequest.cc b/src/librbd/object_map/DiffRequest.cc 
--- a/src/librbd/object_map/DiffRequest.cc
+++ b/src/librbd/object_map/DiffRequest.cc
@@ -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((size_t)m_object_map.size(), 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();
diff -Nurp a/src/client/Client.h b/src/client/Client.h
--- a/src/client/Client.h
+++ b/src/client/Client.h
@@ -525,7 +525,7 @@
   int ll_lookupx(Inode *parent, const char *name, Inode **out,
 			struct ceph_statx *stx, unsigned want, unsigned flags,
 			const UserPerm& perms);
-  bool ll_forget(Inode *in, uint64_t count);
+  bool ll_forget(Inode *in, size_t count);
   bool ll_put(Inode *in);
   int ll_get_snap_ref(snapid_t snap);
 
@@ -1241,7 +1241,7 @@
   void _fragmap_remove_stopped_mds(Inode *in, mds_rank_t mds);
 
   void _ll_get(Inode *in);
-  int _ll_put(Inode *in, uint64_t num);
+  int _ll_put(Inode *in, size_t num);
   void _ll_drop_pins();
 
   Fh *_create_fh(Inode *in, int flags, int cmode, const UserPerm& perms);
@@ -1405,7 +1405,7 @@
   int _lookup_parent(Inode *in, const UserPerm& perms, Inode **parent=NULL);
   int _lookup_name(Inode *in, Inode *parent, const UserPerm& perms);
   int _lookup_vino(vinodeno_t ino, const UserPerm& perms, Inode **inode=NULL);
-  bool _ll_forget(Inode *in, uint64_t count);
+  bool _ll_forget(Inode *in, size_t count);
 
   void collect_and_send_metrics();
   void collect_and_send_global_metrics();
--- a/src/common/cmdparse.h
+++ b/src/common/cmdparse.h
@@ -14,10 +14,10 @@
 
 typedef boost::variant<std::string,
 		       bool,
-		       int64_t,
+		       size_t,
 		       double,
 		       std::vector<std::string>,
-		       std::vector<int64_t>,
+		       std::vector<size_t>,
 		       std::vector<double>>  cmd_vartype;
 typedef std::map<std::string, cmd_vartype, std::less<>> cmdmap_t;
 
--- a/src/s3select/include/s3select_functions.h
+++ b/src/s3select/include/s3select_functions.h
@@ -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)
     {