From: Patrick Donnelly Date: Tue, 11 Nov 2025 15:15:03 +0000 (-0500) Subject: common: properly convert frag_t to net/store endianness X-Git-Tag: v19.2.4~15^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=04b8dc58fb16887f2053a6b2554293977a32547e;p=ceph.git common: properly convert frag_t to net/store endianness The MDS/client are already accidentally doing the right thing unless they are running on a big-endian machine. Credit to Venky Shankar for originally hypothesizing an endianness issue with the frag_t. Fixes: https://tracker.ceph.com/issues/73792 Signed-off-by: Patrick Donnelly (cherry picked from commit 9e3837c837bc9f76805f998dd06fe386dce35722) --- diff --git a/src/common/frag.cc b/src/common/frag.cc index 3d2f820fe47..13a8e154559 100644 --- a/src/common/frag.cc +++ b/src/common/frag.cc @@ -31,13 +31,11 @@ bool frag_t::parse(const char *s) { } void frag_t::encode(ceph::buffer::list& bl) const { - ceph::encode_raw(_enc, bl); + ceph::encode(_enc, bl); } void frag_t::decode(ceph::buffer::list::const_iterator& p) { - __u32 v; - ceph::decode_raw(v, p); - _enc = v; + ceph::decode(_enc, p); } void frag_t::dump(ceph::Formatter *f) const {