]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
include: detect corrupt frag from byteswap 66540/head
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 13 Nov 2025 19:51:20 +0000 (14:51 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Sat, 6 Dec 2025 01:01:21 +0000 (20:01 -0500)
commit73fd7c009c058a4e45ce74abfcf8ca28ad5ae7d6
treed72fa561e88fd339643adb7c3e4160129e7966c5
parent4f0b679b0fc4edef1578a620e36464e20e08d274
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