ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
803fb7
From 42026958cced6fe111bbaccad04d24d8ca3d6c55 Mon Sep 17 00:00:00 2001
803fb7
From: Lukas Nykryn <lnykryn@redhat.com>
803fb7
Date: Fri, 14 Nov 2014 17:07:57 +0100
803fb7
Subject: [PATCH] Revert "fsck: re-enable fsck -l"
803fb7
803fb7
This reverts commit 48d3e8d07f2978f001cc85b2dddb7f8ec9d07006.
803fb7
803fb7
(We have older util-linux in rhel7))
803fb7
803fb7
Conflicts:
803fb7
	README
803fb7
---
803fb7
 README          |  3 ++-
803fb7
 src/fsck/fsck.c | 13 +++++++++----
803fb7
 2 files changed, 11 insertions(+), 5 deletions(-)
803fb7
803fb7
diff --git a/README b/README
803fb7
index c72209262..5f5783a68 100644
803fb7
--- a/README
803fb7
+++ b/README
803fb7
@@ -135,7 +135,8 @@ REQUIREMENTS:
803fb7
         During runtime, you need the following additional
803fb7
         dependencies:
803fb7
 
803fb7
-        util-linux >= v2.25 required
803fb7
+        util-linux >= v2.19 (requires fsck -l, agetty -s),
803fb7
+                      v2.21 required for tests in test/
803fb7
         dbus >= 1.4.0 (strictly speaking optional, but recommended)
803fb7
         dracut (optional)
803fb7
         PolicyKit (optional)
803fb7
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
803fb7
index 78ceeb6fa..d8976809d 100644
803fb7
--- a/src/fsck/fsck.c
803fb7
+++ b/src/fsck/fsck.c
803fb7
@@ -323,11 +323,16 @@ int main(int argc, char *argv[]) {
803fb7
         cmdline[i++] = "-T";
803fb7
 
803fb7
         /*
803fb7
-         * Since util-linux v2.25 fsck uses /run/fsck/<diskname>.lock files.
803fb7
-         * The previous versions use flock for the device and conflict with
803fb7
-         * udevd, see https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
803fb7
+         * Disable locking which conflict with udev's event
803fb7
+         * ownershipi, until util-linux moves the flock
803fb7
+         * synchronization file which prevents multiple fsck running
803fb7
+         * on the same rotationg media, from the disk device
803fb7
+         * node to a privately owned regular file.
803fb7
+         *
803fb7
+         * https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
803fb7
+         *
803fb7
+         * cmdline[i++] = "-l";
803fb7
          */
803fb7
-        cmdline[i++] = "-l";
803fb7
 
803fb7
         if (!root_directory)
803fb7
                 cmdline[i++] = "-M";