]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
include: detect corrupt frag from byteswap 66541/head
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 13 Nov 2025 19:51:20 +0000 (14:51 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Wed, 18 Mar 2026 00:33:17 +0000 (20:33 -0400)
commit204bcc8bfcab819f27fc74b2edc0c6272ca5674c
tree006e699f1815af24de04ac1dc73cadd5de5d7896
parentc49ea953288413d21b4b32419cf6d521551becc5
include: detect corrupt frag from byteswap

If a big-endian MDS writes frag_t values into the metadata pool, these
will persist and confuse the MDS after it tries properly parsing them as
little-endian. Fortunately detecting this situation is fairly easy as we
restrict the number of bits and the number of bits restricts the mask
value.

Fixes: https://tracker.ceph.com/issues/73792
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 6bf91e4f6e49d99711b8be845eb77c883d662704)
src/common/frag.cc
src/include/frag.h