Commit 36d99e3
librbd: store CRC32C with initial value -1 to match msgr2 validation
Fix runtime error, using test command:
sudo dd if=/dev/zero bs=32k of=/dev/nvme0n1 count=1
The error log:
2025-11-23T11:24:10.512+0000 7f30f4ec0640 1 --2- [v2:192.168.13.2:6802/3444906816,v1:192.168.13.2:6803/3444906816] >> 192.168.13.3:0/3916714748 conn(0x527d400 0x728f700 crc :-1 s=THROTTLE_DONE pgs=2038703 gs=2038723 cs=0 l=1 c_cookie=0 s_cookie=0 reconnecting=0 rev1=1 crypto rx=0 tx=0 comp rx=0 tx=0)._handle_read_frame_epilogue_main bad segment crc calculated=1136411986 expected=4294967295
Ceph msgr2 validation (ceph/src/msg/async/frames_v2.cc:47):
uint32_t crc = segment_bl.crc32c(-1); // Uses initial value -1
Co-authored-by: Ilya Dryomov <[email protected]>
Signed-off-by: Alexander Indenbaum <[email protected]>1 parent b2fe749 commit 36d99e3
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | | - | |
1284 | 1283 | | |
1285 | | - | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
1286 | 1288 | | |
1287 | 1289 | | |
1288 | 1290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6418 | 6418 | | |
6419 | 6419 | | |
6420 | 6420 | | |
| 6421 | + | |
6421 | 6422 | | |
6422 | | - | |
| 6423 | + | |
6423 | 6424 | | |
6424 | 6425 | | |
6425 | 6426 | | |
| |||
0 commit comments