Skip to content

Commit 6eb0dae

Browse files
committed
messages: fix MOSDOpReplay decode of old version bad_replay_version
When decoding an old version of MOSDOpReplay or when the PGID64 feature is enabled, bad_replay_version is not being set, which causes inconsistent output in ceph-dencoder. To fix this, set bad_replay_version to the head reassert_version value. This ensures that if the struct is later re-encoded, the decode output will be consistent. Fixes: https://tracker.ceph.com/issues/69814 Signed-off-by: Nitzan Mordechai <[email protected]>
1 parent a10b771 commit 6eb0dae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/messages/MOSDOpReply.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ class MOSDOpReply final : public Message {
271271
pgid = pg_t(head.layout.ol_pgid);
272272
result.set_wire_to_host((int32_t)head.result);
273273
flags = head.flags;
274+
bad_replay_version = head.reassert_version;
274275
replay_version = head.reassert_version;
275276
user_version = replay_version.version;
276277
osdmap_epoch = head.osdmap_epoch;

0 commit comments

Comments
 (0)