diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-09-21 14:07:18 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-09 19:07:58 -0800 |
commit | df2fde340c50b53da701f3d0741e8724a70c7a79 (patch) | |
tree | 021bbd6148edba8b2aee1d47b88e24d49bc7ca93 /fs/xfs/libxfs/xfs_format.h | |
parent | e5636817166323daf80948d41150549459ea97cc (diff) |
xfs: encode the rtbitmap in little endian format
Currently, the ondisk realtime bitmap file is 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.
The natural format of a bitmap is (IMHO) little endian, because the byte
offsets of the bitmap data should always increase in step with the
information being indexed.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_format.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_format.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h index 35e33ed132fb..0a5963c73bc2 100644 --- a/fs/xfs/libxfs/xfs_format.h +++ b/fs/xfs/libxfs/xfs_format.h @@ -738,10 +738,12 @@ struct xfs_agfl { /* * Realtime bitmap information is accessed by the word, which is currently - * stored in host-endian format. + * stored in host-endian format. Starting with the realtime groups feature, + * the words are stored in le32 ondisk. */ union xfs_rtword_ondisk { __u32 raw; + __le32 rtg; }; /* |