From ddf6b79dc5292163d24e24e72337875f0d4ea99c Mon Sep 17 00:00:00 2001 From: Nitzan Mordechai Date: Thu, 16 Oct 2025 14:03:22 +0000 Subject: [PATCH] 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 --- src/messages/MOSDOpReply.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/messages/MOSDOpReply.h b/src/messages/MOSDOpReply.h index 05f63560621..7b7ad9608dc 100644 --- a/src/messages/MOSDOpReply.h +++ b/src/messages/MOSDOpReply.h @@ -271,6 +271,7 @@ public: pgid = pg_t(head.layout.ol_pgid); result.set_wire_to_host((int32_t)head.result); flags = head.flags; + bad_replay_version = head.reassert_version; replay_version = head.reassert_version; user_version = replay_version.version; osdmap_epoch = head.osdmap_epoch; -- 2.39.5