Skip to content

tentacle: common/frag: properly convert frag_t to net/store endianness - #66540

Merged
batrick merged 8 commits into
ceph:tentaclefrom
batrick:wip-74115-tentacle
Feb 26, 2026
Merged

batrick merged 8 commits into
ceph:tentaclefrom
batrick:wip-74115-tentacle

Conversation

@batrick

@batrick batrick commented Dec 6, 2025

Copy link
Copy Markdown
Member

MaxKellermann and others added 8 commits December 5, 2025 19:57
Signed-off-by: Max Kellermann <[email protected]>
(cherry picked from commit 5f1a893)
Of particular interest is the CPU architecture and endianness.

Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit fa4078a)
The MDS/client are already accidentally doing the right thing unless
they are running on a big-endian machine.

Credit to Venky Shankar for originally hypothesizing an endianness issue
with the frag_t.

Fixes: https://tracker.ceph.com/issues/73792
Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit 9e3837c)
There's better tooling for this now and we can avoid magic numbers.

Fixes: https://tracker.ceph.com/issues/73792
Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit 647de21)
Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit 4fb5ad4)

Conflicts:
	src/common/frag.cc: missing test instance refactor
	src/mds/mdstypes.cc: missing test instance refactor
Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit 1d526c5)
Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit 7fdf680)
If a big-endian MDS writes frag_t values into the metadata pool, these
will persist and confuse the MDS after it tries properly parsing them as
little-endian. Fortunately detecting this situation is fairly easy as we
restrict the number of bits and the number of bits restricts the mask
value.

Fixes: https://tracker.ceph.com/issues/73792
Signed-off-by: Patrick Donnelly <[email protected]>
(cherry picked from commit 6bf91e4)
@batrick
batrick requested a review from a team as a code owner December 6, 2025 01:01
@batrick batrick added this to the tentacle milestone Dec 6, 2025
@batrick batrick added the common label Dec 6, 2025
@joscollin

Copy link
Copy Markdown
Member

jenkins test make check

@batrick

batrick commented Feb 12, 2026

Copy link
Copy Markdown
Member Author

@batrick batrick modified the milestones: tentacle, v20.2.1 Feb 13, 2026
@batrick

batrick commented Feb 26, 2026

Copy link
Copy Markdown
Member Author

@batrick

batrick commented Feb 26, 2026

Copy link
Copy Markdown
Member Author

Reviewed-by: Patrick Donnelly <[email protected]>
Tested-by: Patrick Donnelly <[email protected]>

@batrick
batrick merged commit c9f73b3 into ceph:tentacle Feb 26, 2026
@batrick
batrick deleted the wip-74115-tentacle branch February 26, 2026 20:18
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/22459547849

@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I found one or more Fixes: tags in the commit messages in

git log c9f73b3055c5546c1b7611c03e245f2198cb3c39^..c9f73b3055c5546c1b7611c03e245f2198cb3c39

The referenced tickets are:

Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them.

Update Log: https://github.com/ceph/ceph/actions/runs/22459547849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants