@@ -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;
};
/*
@@ -173,6 +173,9 @@ xfs_rtbitmap_getword(
struct xfs_mount *mp,
union xfs_rtword_ondisk *wordptr)
{
+ if (xfs_has_rtgroups(mp))
+ return le32_to_cpu(wordptr->rtg);
+
return wordptr->raw;
}
@@ -183,7 +186,10 @@ xfs_rtbitmap_setword(
union xfs_rtword_ondisk *wordptr,
xfs_rtword_t incore)
{
- wordptr->raw = incore;
+ if (xfs_has_rtgroups(mp))
+ wordptr->rtg = cpu_to_le32(incore);
+ else
+ wordptr->raw = incore;
}
/*