]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
generator: skip fsck early for non-blockdev file systems, or file systems that are...
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Mar 2025 14:15:10 +0000 (15:15 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Mar 2025 17:18:43 +0000 (18:18 +0100)
src/shared/generator.c

index f2997c1b167597c2e8e27f1023ff0a1bce324e3f..0bec2a2a27772d782c7743d9cf74c4ea29f815a7 100644 (file)
@@ -286,6 +286,18 @@ int generator_write_fsck_deps(
                 return 0;
         }
 
+        if (fstype) {
+                if (!fstype_is_blockdev_backed(fstype)) {
+                        log_debug("Skipping file system check for non-block based file system '%s'.", what);
+                        return 0;
+                }
+
+                if (fstype_is_ro(fstype)) {
+                        log_debug("Skipping file system check for read-only file system '%s'.", what);
+                        return 0;
+                }
+        }
+
         if (!is_device_path(what)) {
                 log_warning("Checking was requested for \"%s\", but it is not a device.", what);
                 return 0;