]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkfs-util: Always use "default" usage type for ext filesystems
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 12 Mar 2023 14:15:35 +0000 (15:15 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 12 Mar 2023 14:15:35 +0000 (15:15 +0100)
If no usage type is explicitly specified, ext will choose one based
on the filesystem size. Let's override this and always use the
"default" usage type so that we can create filesystems that are
initially small but might grow later without opting in to the "small"
usage type.

src/shared/mkfs-util.c

index 7e620391e3560cf9ffd9dd3e407fe9a0d191d2f9..33cb83343c4ece50e1dca03e4c22b97629727552 100644 (file)
@@ -361,6 +361,7 @@ int make_filesystem(
                                 "-m", "0",
                                 "-E", discard ? "discard,lazy_itable_init=1" : "nodiscard,lazy_itable_init=1",
                                 "-b", "4096",
+                                "-T", "default",
                                 node);
                 if (!argv)
                         return log_oom();
@@ -378,6 +379,7 @@ int make_filesystem(
                                 "-m", "0",
                                 "-E", discard ? "discard,lazy_itable_init=1" : "nodiscard,lazy_itable_init=1",
                                 "-b", "4096",
+                                "-T", "default",
                                 node);
 
                 if (root && strv_extend_strv(&argv, STRV_MAKE("-d", root), false) < 0)