X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ffsck%2Ffsck.c;h=e8596d90f805df3d35218dc9735cf484016c8f4c;hb=0372cb2bd2342fa5c5585c666f79159a8341f4a6;hp=594f21e070ee90846984e1b954bc13529e887f1a;hpb=f1f0198cb61a3398557cc9ec596e1e90ac731ed3;p=elogind.git diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c index 594f21e07..e8596d90f 100644 --- a/src/fsck/fsck.c +++ b/src/fsck/fsck.c @@ -86,7 +86,8 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { else if (streq(value, "skip")) arg_skip = true; else - log_warning("Invalid fsck.mode= parameter. Ignoring."); + log_warning("Invalid fsck.mode= parameter '%s'. Ignoring.", value); + } else if (streq(key, "fsck.repair") && value) { if (streq(value, "preen")) @@ -96,13 +97,14 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { else if (streq(value, "no")) arg_repair = "-n"; else - log_warning("Invalid fsck.repair= parameter. Ignoring."); - } else if (startswith(key, "fsck.")) - log_warning("Invalid fsck parameter. Ignoring."); + log_warning("Invalid fsck.repair= parameter '%s'. Ignoring.", value); + } + #ifdef HAVE_SYSV_COMPAT else if (streq(key, "fastboot") && !value) { log_warning("Please pass 'fsck.mode=skip' rather than 'fastboot' on the kernel command line."); arg_skip = true; + } else if (streq(key, "forcefsck") && !value) { log_warning("Please pass 'fsck.mode=force' rather than 'forcefsck' on the kernel command line."); arg_force = true; @@ -113,6 +115,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { } static void test_files(void) { + #ifdef HAVE_SYSV_COMPAT if (access("/fastboot", F_OK) >= 0) { log_error("Please pass 'fsck.mode=skip' on the kernel command line rather than creating /fastboot on the root file system."); @@ -299,13 +302,11 @@ int main(int argc, char *argv[]) { type = udev_device_get_property_value(udev_device, "ID_FS_TYPE"); if (type) { r = fsck_exists(type); - if (r < 0) { - if (r == -ENOENT) { - log_info("fsck.%s doesn't exist, not checking file system.", type); - return EXIT_SUCCESS; - } else - log_warning("fsck.%s cannot be used: %s", type, strerror(-r)); - } + if (r == -ENOENT) { + log_info("fsck.%s doesn't exist, not checking file system on %s", type, device); + return EXIT_SUCCESS; + } else if (r < 0) + log_warning("fsck.%s cannot be used for %s: %s", type, device, strerror(-r)); } if (arg_show_progress) @@ -317,7 +318,18 @@ int main(int argc, char *argv[]) { cmdline[i++] = "/sbin/fsck"; cmdline[i++] = arg_repair; cmdline[i++] = "-T"; - cmdline[i++] = "-l"; + + /* + * Disable locking which conflict with udev's event + * ownershipi, until util-linux moves the flock + * synchronization file which prevents multiple fsck running + * on the same rotationg media, from the disk device + * node to a privately owned regular file. + * + * https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5 + * + * cmdline[i++] = "-l"; + */ if (!root_directory) cmdline[i++] = "-M";