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
0eed07d6
Commit
0eed07d6
authored
Aug 14, 2021
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default alignment should be always 8 regardless of CPU architecture
parent
66dce580
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
60 deletions
+8
-60
ceph-15.2.4-fix_v2_frame.patch
ceph-15.2.4-fix_v2_frame.patch
+8
-60
No files found.
ceph-15.2.4-fix_v2_frame.patch
View file @
0eed07d6
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 @@
+++ ceph-15.2.4-fix_v2_frame/src/msg/async/frames_v2.h 2021-08-14 10:06:23.517830235 +0930
@@ -60,7 +60,7 @@
// We need them because of the rx_buffers zero-copy optimization.
static constexpr __u16 PAGE_SIZE_ALIGNMENT = 4096;
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;
};
- static constexpr __u16 DEFAULT_ALIGNMENT = sizeof(void *);
+ static constexpr __u16 DEFAULT_ALIGNMENT = 8;
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);
}
ceph_le32 length;
ceph_le16 alignment;
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