]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: disallow -O verity without extents
authorAllison Karlitskaya <allison.karlitskaya@redhat.com>
Thu, 13 Mar 2025 16:18:17 +0000 (17:18 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 24 May 2025 23:28:45 +0000 (19:28 -0400)
Similar to 64-bit support, fs-verity support requires extents, so don't
allow to create a filesystem that has -O verity unless it also supports
extents.

misc/mke2fs.c

index 66675976e538c643a24ea5a19734db635389f101..456cf6f193976466bd614cecbc0bc5a8f59521a6 100644 (file)
@@ -2397,6 +2397,14 @@ profile_error:
                exit(1);
        }
 
+       /* fs-verity support requires extents */
+       if (ext2fs_has_feature_verity(&fs_param) &&
+           !ext2fs_has_feature_extents(&fs_param)) {
+               printf("%s", _("Extents MUST be enabled for fs-verity "
+                              "support.  Pass -O extents to rectify.\n"));
+               exit(1);
+       }
+
        /* Set first meta blockgroup via an environment variable */
        /* (this is mostly for debugging purposes) */
        if (ext2fs_has_feature_meta_bg(&fs_param) &&