All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH] fs/ext2: remove ext2 revision 0 support
Date: Mon,  3 Feb 2025 16:29:52 +0100	[thread overview]
Message-ID: <20250203152952.3079934-1-peter@korsgaard.com> (raw)

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.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 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(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index abc65d0c9a..edca3eef47 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -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
diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in
index 7d42621202..c50f22626a 100644
--- a/fs/ext2/Config.in
+++ b/fs/ext2/Config.in
@@ -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"
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index b49a8456f4..89e0e7b9b3 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -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)" \
diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py
index 699f3ed932..7612ad2b30 100644
--- a/support/testing/tests/fs/test_ext.py
+++ b/support/testing/tests/fs/test_ext.py
@@ -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
-- 
2.39.5

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2025-02-03 15:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 15:29 Peter Korsgaard [this message]
2025-02-03 17:52 ` [Buildroot] [PATCH] fs/ext2: remove ext2 revision 0 support Julien Olivain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250203152952.3079934-1-peter@korsgaard.com \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.