Skip to content

Commit af5c793

Browse files
Darrick J. Wonglsandov1
authored andcommitted
fs/xfs: Add new superblock features added in Linux 6.12/6.13
The Linux port of XFS added a few new features in 2024. The existing GRUB driver doesn't attempt to read or write any of the new metadata, so, all three can be added to the incompat allowlist. On the occasion align XFS_SB_FEAT_INCOMPAT_NREXT64 value. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1 parent 21183cc commit af5c793

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

grub-core/fs/xfs.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ GRUB_MOD_LICENSE ("GPLv3+");
8888
#define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
8989
#define XFS_SB_FEAT_INCOMPAT_BIGTIME (1 << 3) /* large timestamps */
9090
#define XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR (1 << 4) /* needs xfs_repair */
91-
#define XFS_SB_FEAT_INCOMPAT_NREXT64 (1 << 5) /* large extent counters */
91+
#define XFS_SB_FEAT_INCOMPAT_NREXT64 (1 << 5) /* large extent counters */
92+
#define XFS_SB_FEAT_INCOMPAT_EXCHRANGE (1 << 6) /* exchangerange supported */
93+
#define XFS_SB_FEAT_INCOMPAT_PARENT (1 << 7) /* parent pointers */
94+
#define XFS_SB_FEAT_INCOMPAT_METADIR (1 << 8) /* metadata dir tree */
9295

9396
/*
9497
* Directory entries with ftype are explicitly handled by GRUB code.
@@ -98,14 +101,26 @@ GRUB_MOD_LICENSE ("GPLv3+");
98101
*
99102
* We do not currently verify metadata UUID, so it is safe to read filesystems
100103
* with the XFS_SB_FEAT_INCOMPAT_META_UUID feature.
104+
*
105+
* We do not currently replay the log, so it is safe to read filesystems
106+
* with the XFS_SB_FEAT_INCOMPAT_EXCHRANGE feature.
107+
*
108+
* We do not currently read directory parent pointers, so it is safe to read
109+
* filesystems with the XFS_SB_FEAT_INCOMPAT_PARENT feature.
110+
*
111+
* We do not currently look at realtime or quota metadata, so it is safe to
112+
* read filesystems with the XFS_SB_FEAT_INCOMPAT_METADIR feature.
101113
*/
102114
#define XFS_SB_FEAT_INCOMPAT_SUPPORTED \
103115
(XFS_SB_FEAT_INCOMPAT_FTYPE | \
104116
XFS_SB_FEAT_INCOMPAT_SPINODES | \
105117
XFS_SB_FEAT_INCOMPAT_META_UUID | \
106118
XFS_SB_FEAT_INCOMPAT_BIGTIME | \
107119
XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR | \
108-
XFS_SB_FEAT_INCOMPAT_NREXT64)
120+
XFS_SB_FEAT_INCOMPAT_NREXT64 | \
121+
XFS_SB_FEAT_INCOMPAT_EXCHRANGE | \
122+
XFS_SB_FEAT_INCOMPAT_PARENT | \
123+
XFS_SB_FEAT_INCOMPAT_METADIR)
109124

110125
struct grub_xfs_sblock
111126
{

0 commit comments

Comments
 (0)