grub/grub-core/fs
Daniel Kiper 14ed7207b1 xfs: Accept filesystem with sparse inodes
The sparse inode metadata format became a mkfs.xfs default in
xfsprogs-4.16.0, and such filesystems are now rejected by grub as
containing an incompatible feature.

In essence, this feature allows xfs to allocate inodes into fragmented
freespace.  (Without this feature, if xfs could not allocate contiguous
space for 64 new inodes, inode creation would fail.)

In practice, the disk format change is restricted to the inode btree,
which as far as I can tell is not used by grub.  If all you're doing
today is parsing a directory, reading an inode number, and converting
that inode number to a disk location, then ignoring this feature
should be fine, so I've added it to XFS_SB_FEAT_INCOMPAT_SUPPORTED

I did some brief testing of this patch by hacking up the regression
tests to completely fragment freespace on the test xfs filesystem, and
then write a large-ish number of inodes to consume any existing
contiguous 64-inode chunk.  This way any files the grub tests add and
traverse would be in such a fragmented inode allocation.  Tests passed,
but I'm not sure how to cleanly integrate that into the test harness.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Chris Murphy <lists@colorremedies.com>
2020-09-21 13:19:10 -04:00
..
zfs zfs: remove size_t typedef and use grub_size_t instead 2020-09-21 11:32:45 -04:00
affs.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
afs.c Leverage BFS implementation to read AFS. 2011-10-30 16:10:18 +01:00
archelp.c archelp: Never pass NULL as mtime. 2015-07-27 13:19:02 +02:00
bfs.c BFS: Convert to fshelp. 2015-07-27 12:48:38 +02:00
btrfs.c Fix packed-not-aligned error on GCC 8 2019-10-24 16:59:37 +02:00
cbfs.c cbfs: Fix corner case and compilation with recdent gcc 2015-11-09 03:24:04 +01:00
cpio.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
cpio_be.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
cpio_common.c fs/{cbfs,cpio}: Remove useless check if mode is NULL. 2015-01-27 16:32:21 +01:00
exfat.c exfat reader 2011-04-11 18:13:00 +02:00
ext2.c Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature. 2020-09-21 11:32:45 -04:00
f2fs.c fs: Add F2FS support 2020-09-21 12:43:53 -04:00
fat.c exfat: Support files over 4GiB 2017-01-27 22:10:21 +00:00
fshelp.c fshelp: Add handling of "." and ".." and grub_fshelp_find_file_lookup. 2015-07-27 12:45:35 +02:00
hfs.c hfs: fix memory leak 2016-01-09 11:36:42 +03:00
hfsplus.c Add missing initializers to silence suprious warnings. 2015-03-27 14:44:41 +01:00
hfspluscomp.c Make grub_zlib_decompress handle incomplete chunks. 2013-12-18 23:39:49 +01:00
iso9660.c Remove the variable oldname which is attempting to free stack space. 2016-03-15 22:04:38 +03:00
jfs.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
minix.c fs/minix: Fix sector promotion to 64-bit. 2015-01-25 20:32:31 +01:00
minix2.c Split minix.mod into minix.mod and minix2.mod. 2010-09-08 19:13:48 +02:00
minix2_be.c Handle big-endian minixfs (fixes minixfs tests on bigendian). 2012-04-01 21:35:18 +02:00
minix3.c minix3fs support 2011-04-11 08:16:13 +02:00
minix3_be.c Handle big-endian minixfs (fixes minixfs tests on bigendian). 2012-04-01 21:35:18 +02:00
minix_be.c Handle big-endian minixfs (fixes minixfs tests on bigendian). 2012-04-01 21:35:18 +02:00
newc.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
nilfs2.c Reject NILFS2 superblocks with over 1GiB blocks. 2015-01-21 17:42:10 +01:00
ntfs.c fs/ntfs: Add sizes sanity checks. 2015-01-25 20:32:31 +01:00
ntfscomp.c Fix warnings when compiling with -O3 2016-02-17 17:56:41 +01:00
odc.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
proc.c Switch procfs to use archelp. 2015-07-27 12:44:19 +02:00
reiserfs.c reiserfs: Fix handling of first entry in the directory. 2015-07-24 01:23:45 +02:00
romfs.c Remove nested functions from disk and file read hooks. 2013-02-27 17:19:15 +01:00
sfs.c fs/sfs: Fix error check and add sanity check. 2015-01-25 20:32:31 +01:00
squash4.c squash4: fix handling of fragments and sparse files 2017-02-24 19:10:43 +03:00
tar.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
udf.c * grub-core/fs/udf.c: Add support for UUID 2020-09-21 11:32:45 -04:00
ufs.c ufs: Fix parameters to grub_memset. 2015-10-09 13:35:40 +02:00
ufs2.c automake commit without merge history 2010-05-06 11:34:04 +05:30
ufs_be.c Support big-endian UFS1. 2012-12-08 20:56:58 +01:00
xfs.c xfs: Accept filesystem with sparse inodes 2020-09-21 13:19:10 -04:00