Repository navigation
Conversation
The length MUST be stored in little-endian to match the encode() wire format. A native __u32 cast to (unsigned char*) produces big-endian bytes on s390x, diverging from the stored omap_digest written by the pre-20.x bufferhash path and causing persistent scrub errors on big-endian platforms after upgrade. Fixes: https://tracker.ceph.com/issues/79104 Signed-off-by: Brad Hubbard <[email protected]>
Signed-off-by: Brad Hubbard <[email protected]>
6bd8f8f to
b80e55a
Compare
|
jenkins test api |
bill-scales
left a comment
There was a problem hiding this comment.
Agree with the analysis on the tracker ticket and the fix, but this still leaves the problem of what to do with systems that have bad omap digests.
One solution would be to relax the CRC verification to accept either the stored crc or a modified version of this using an endian swapped length so that both the correct and buggy CRC calculations are accepted. Given the buggy CRC and the length field it is possible to calculate the correct CRC field - you do not need all the omap data to calculate the correct CRC.
This would reduce (half?) the strength of the CRC check, we would only need to do this on big-endian systems. If we make deep scrub fix the CRC if it detects a buggy CRC then we could put all this behind a conf setting - so anyone with corrupted CRCs would enable the conf setting, run with reduced strength CRCs until a full deep scrub has been completed and fixed the errors and then could turn off the conf setting to restore full strength CRCs.
| encode(std::string(data), bl); | ||
| uint32_t crc_encode = bl.crc32c(0xFFFFFFFF); | ||
|
|
||
| EXPECT_EQ(crc_le, crc_encode); |
| // len must use ceph_le32 to guarantee little-endian encoding on all platforms, | ||
| // matching Ceph's encode() wire format regardless of host byte order. | ||
| // See test: Crc32c.OmapDigestLengthFieldIsLittleEndian | ||
| ceph_le32 len{static_cast<uint32_t>(data.length())}; |
There was a problem hiding this comment.
Good catch. Even the fix alone is obviously worth merging. However, adding the workaround described by @bill-scales is definitely preferred.
rzarzynski
left a comment
There was a problem hiding this comment.
I'm working on the crc mismatch hack. I think I will send as a follow-up PR.
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test windows |
|
jenkins test api |
Right, we can't delay this for any additional work ATM IMHO. |
|
This PR has been added to wip-bharath8-testing-20260813.003211-main. |
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.