Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ceph
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
ceph
Commits
66dce580
Commit
66dce580
authored
Aug 12, 2021
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that v2 frames always use 64 bit values
parent
54be1507
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
Makefile
Makefile
+1
-0
ceph-15.2.4-fix_v2_frame.patch
ceph-15.2.4-fix_v2_frame.patch
+64
-0
No files found.
Makefile
View file @
66dce580
...
...
@@ -31,6 +31,7 @@ all: ceph-config
ln
-s
/lib
/lib64
tar
xf
ceph-15.2.4.tar.gz
patch
-Np1
-d
ceph-15.2.4
<
ceph-15.2.4-fix_v2_frame.patch
patch
-Np1
-d
ceph-15.2.4
<
ceph-15.2.4-fix_cpu_detection.patch
patch
-Np1
-d
ceph-15.2.4
<
ceph-15.2.4-fix_tests.patch
patch
-Np1
-d
ceph-15.2.4
<
ceph-15.2.4-fix_ceph-volume_systemd_unit.patch
...
...
ceph-15.2.4-fix_v2_frame.patch
0 → 100644
View file @
66dce580
diff -uNr ceph-15.2.4/src/msg/async/frames_v2.h ceph-15.2.4-fix_v2_frame/src/msg/async/frames_v2.h
--- ceph-15.2.4/src/msg/async/frames_v2.h 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_v2_frame/src/msg/async/frames_v2.h 2021-08-11 22:28:55.126810164 +0930
@@ -68,20 +68,20 @@
struct SegmentIndex {
struct Msg {
- static constexpr std::size_t HEADER = 0;
- static constexpr std::size_t FRONT = 1;
- static constexpr std::size_t MIDDLE = 2;
- static constexpr std::size_t DATA = 3;
+ static constexpr std::uint64_t HEADER = 0;
+ static constexpr std::uint64_t FRONT = 1;
+ static constexpr std::uint64_t MIDDLE = 2;
+ static constexpr std::uint64_t DATA = 3;
};
struct Control {
- static constexpr std::size_t PAYLOAD = 0;
+ static constexpr std::uint64_t PAYLOAD = 0;
};
};
static constexpr uint8_t CRYPTO_BLOCK_SIZE { 16 };
-static constexpr std::size_t MAX_NUM_SEGMENTS = 4;
+static constexpr std::uint64_t MAX_NUM_SEGMENTS = 4;
// V2 preamble consists of one or more preamble blocks depending on
// the number of segments a particular frame needs. Each block holds
@@ -166,7 +166,7 @@
template <class T, uint16_t... SegmentAlignmentVs>
struct Frame {
- static constexpr size_t SegmentsNumV = sizeof...(SegmentAlignmentVs);
+ static constexpr uint64_t SegmentsNumV = sizeof...(SegmentAlignmentVs);
static_assert(SegmentsNumV > 0 && SegmentsNumV <= MAX_NUM_SEGMENTS);
protected:
std::array<ceph::bufferlist, SegmentsNumV> segments;
@@ -227,7 +227,7 @@
reinterpret_cast<const char *>(&main_preamble));
}
- template <size_t... Is>
+ template <uint64_t... Is>
void reset_tx_handler(
ceph::crypto::onwire::rxtx_t &session_stream_handlers,
std::index_sequence<Is...>)
@@ -349,13 +349,13 @@
}
}
- template <std::size_t... Is>
+ template <std::uint64_t... Is>
inline void _decode_payload(bufferlist::const_iterator &ti,
std::index_sequence<Is...>) const {
(_decode_payload_each((Args &)std::get<Is>(_values), ti), ...);
}
- template <std::size_t N>
+ template <std::uint64_t N>
inline decltype(auto) get_val() {
return std::get<N>(_values);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment