generator: skip fsck early for non-blockdev file systems, or file systems that are always read-only

This commit is contained in:
Lennart Poettering
2025-03-19 18:18:43 +01:00
parent 179dcf924f
commit f21090d217
+12
View 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;