daandemeyer / rpms / systemd

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