Commit d01003e
committed
osd: recalculate coll_t::_str during decode() to fix stale values
Fix compatibility issue where coll_t::_str retained stale values after
decoding v1/v2 format blobs, causing confusing debug output and tool
messages.
The _str field was not recalculated when decoding older formats:
- v1 format (pre-Ceph v0.21, before commit a108774)
- v2 format (meta/regular PGs)
- v3 format always includes _str (temp PGs)
This primarily affected debugging scenarios since _str is only used for
log messages and BlueStore low-level tool output. The issue went
undetected because existing tests reused struct instances, preserving
field values across encode/decode cycles.
An upcoming test change will allocate fresh instances for each decode,
which would expose these stale values. Since _str can be derived from
always-encoded fields, recalculate it during decode() when missing
from the encoded data.
Signed-off-by: Kefu Chai <[email protected]>1 parent bffa446 commit d01003e
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
1054 | 1056 | | |
1055 | 1057 | | |
1056 | 1058 | | |
| |||
1063 | 1065 | | |
1064 | 1066 | | |
1065 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
1066 | 1070 | | |
1067 | 1071 | | |
1068 | 1072 | | |
| |||
0 commit comments