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: testing/wip-pdonnell-testing-20260323.122957-tentacle~352 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9865e1658c79f0aba81cc728aaa6dde0aa7f6a83;p=ceph-ci.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. Fixes: https://tracker.ceph.com/issues/73792 Signed-off-by: Patrick Donnelly (cherry picked from commit e1c205209aeee636325ab22635f0cade24044f1c) Resolves: rhbz#2414841 --- 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 {