]> www.infradead.org Git - users/dwmw2/linux.git/commit
xfs: encode the rtsummary in big endian format
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:19:24 +0000 (20:19 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:41 +0000 (13:38 -0800)
commita2c28367396a85f2d9cfb22acfcedcff08dd1c3c
treeb20a0bf81cf9b73dc83afe66c6edb7593191b2ec
parenteba42c2c53c8b8905307b702c93dffef0719a896
xfs: encode the rtsummary in big endian format

Currently, the ondisk realtime summary file counters are accessed in
units of 32-bit words.  There's no endian translation of the contents of
this file, which means that the Bad Things Happen(tm) if you go from
(say) x86 to powerpc.  Since we have a new feature flag, let's take the
opportunity to enforce an endianness on the file.  Encode the summary
information in big endian format, like most of the rest of the
filesystem.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_rtbitmap.h
fs/xfs/scrub/rtsummary.c