fs/ext2: remove ext2 revision 0 support
PATCH 1/1 fs/ext2: remove ext2 revision 0 support
Revision 0 is very old and misses a number of features. From man mkfs.ext2:
Set the file system revision for the new file system. Note that 1.2 kernels only support revision 0 file systems. The default is to create revision 1 file systems.
We are unlikely to have a lot of Linux 1.2.x users, so drop support for it.
As revision 1 is the default, drop the -E revision argument to mkfs.ext2 for simplicity.
--- Config.in.legacy | 7 +++++++ fs/ext2/Config.in | 16 ++-------------- fs/ext2/ext2.mk | 1 - support/testing/tests/fs/test_ext.py | 20 -------------------- 4 files changed, 9 insertions(+), 35 deletions(-)
Config.in.legacy +7 -0
@@ -146,6 +146,13 @@ endif comment "Legacy options removed in 2025.02" +config BR2_TARGET_ROOTFS_EXT2_2r0 + bool "ext2 rev0 support been removed" + select BR2_LEGACY + help + Support for ext2 revision 0 format has been removed and + revision 1 is now unconditionally used. + config BR2_GDB_VERSION_13 bool "gdb 13.x has been removed" select BR2_LEGACY
fs/ext2/Config.in +2 -14
@@ -13,10 +13,6 @@ choice bool "ext2/3/4 variant" default BR2_TARGET_ROOTFS_EXT2_2r1 -config BR2_TARGET_ROOTFS_EXT2_2r0 - bool "ext2 (rev0)" - select BR2_TARGET_ROOTFS_EXT2_2 - config BR2_TARGET_ROOTFS_EXT2_2r1 bool "ext2 (rev1)" select BR2_TARGET_ROOTFS_EXT2_2
@@ -35,12 +31,6 @@ config BR2_TARGET_ROOTFS_EXT2_GEN default 3 if BR2_TARGET_ROOTFS_EXT2_3 default 4 if BR2_TARGET_ROOTFS_EXT2_4 -# All ext generations are revision 1, except ext2r0, which is revision 0 -config BR2_TARGET_ROOTFS_EXT2_REV - int - default 0 if BR2_TARGET_ROOTFS_EXT2_2r0 - default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0 - config BR2_TARGET_ROOTFS_EXT2_LABEL string "filesystem label" default "rootfs"
@@ -85,8 +75,7 @@ config BR2_TARGET_ROOTFS_EXT2_RESBLKS config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS string "additional mke2fs options" - # Note: ext2 rev0 does not support filesystem options. - default "-O ^64bit" if !BR2_TARGET_ROOTFS_EXT2_2r0 + default "-O ^64bit" help Specify a space-separated list of mke2fs options, including any ext2/3/4 filesystem features.
@@ -101,8 +90,7 @@ config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS support. This default value has been chosen because U-Boot versions before 2017.02 don't support this filesystem option: using it may make the filesystem unreadable by - U-Boot. Note: this default does not apply to the old ext2 - (rev0) which does not support filesystem options. + U-Boot. choice prompt "Compression method"
fs/ext2/ext2.mk +0 -1
@@ -18,7 +18,6 @@ ROOTFS_EXT2_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL)) ROOTFS_EXT2_OPTS = \ -d $(TARGET_DIR) \ - -E revision=$(BR2_TARGET_ROOTFS_EXT2_REV) \ -N $(BR2_TARGET_ROOTFS_EXT2_INODES) \ -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \ -L "$(ROOTFS_EXT2_LABEL)" \
support/testing/tests/fs/test_ext.py +0 -20
@@ -38,26 +38,6 @@ def boot_img_and_check_fs_type(emulator, builddir, fs_type): class TestExt2(infra.basetest.BRTest): - config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ - """ - BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_2r0=y - BR2_TARGET_ROOTFS_EXT2_LABEL="foobaz" - BR2_TARGET_ROOTFS_EXT2_SIZE="16384" - # BR2_TARGET_ROOTFS_TAR is not set - """ - - def test_run(self): - out = dumpe2fs_run(self.builddir, "rootfs.ext2") - self.assertEqual(dumpe2fs_getprop(out, VOLNAME_PROP), "foobaz") - self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "0 (original)") - - exit_code = boot_img_and_check_fs_type(self.emulator, - self.builddir, "ext2") - self.assertEqual(exit_code, 0) - - -class TestExt2r1(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ BR2_TARGET_ROOTFS_EXT2=y
Signature · 6 lines
2.39.5 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines · Peter Korsgaard
Revision 0 is very old and misses a number of features. From man mkfs.ext2:
Set the file system revision for the new file system. Note that 1.2 kernels only support revision 0 file systems. The default is to create revision 1 file systems.
Quoted 6 lines
We are unlikely to have a lot of Linux 1.2.x users, so drop support for it.
As revision 1 is the default, drop the -E revision argument to mkfs.ext2 for simplicity.
Signed-off-by Peter Korsgaard <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot