[systemd-devel] [PATCH] fsck: re-enable fsck -l

Maciej Wereski m.wereski at partner.samsung.com
Wed Oct 22 03:22:29 PDT 2014


22.10.2014 at 10:28 Karel Zak <kzak at redhat.com> wrote:

> The -l (lock) has been temporary disabled due to conflict with
> udev (https://bugs.freedesktop.org/show_bug.cgi?id=79576)
>
> The problem is fixed since util-linux v2.25 (Jul 2014).
> ---
>  README          |  3 ++-
>  src/fsck/fsck.c | 13 ++++---------
>  2 files changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/README b/README
> index e0edd41..8f7a96e 100644
> --- a/README
> +++ b/README
> @@ -129,8 +129,9 @@ REQUIREMENTS:
>          During runtime, you need the following additional
>          dependencies:
> -        util-linux >= v2.19 (requires fsck -l, agetty -s),
> +        util-linux >= v2.19 required for agetty -s
>                        v2.21 required for tests in test/
> +                      v2.25 required for fsck -l

Well, actually it should be util-linux >= v2.25 now. -l is always enabled,
so on earlier versions of util-linux the bug remains.

>          dbus >= 1.4.0 (strictly speaking optional, but recommended)
>          sulogin (from util-linux >= 2.22 or sysvinit-tools, optional  
> but recommended,
>                   required for tests in test/)
> diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
> index dfe97bc..70a5918 100644
> --- a/src/fsck/fsck.c
> +++ b/src/fsck/fsck.c
> @@ -320,16 +320,11 @@ int main(int argc, char *argv[]) {
>          cmdline[i++] = "-T";
>         /*
> -         * 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";
> +         * Since util-linux v2.25 fsck uses /run/fsck/<diskname>.lock  
> files.
> +         * The previous versions use flock for the device and conflict  
> with
> +         * udevd, see  
> https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
>           */
> +        cmdline[i++] = "-l";
>         if (!root_directory)
>                  cmdline[i++] = "-M";

regards,
-- 
Maciej Wereski
Samsung R&D Institute Poland
Samsung Electronics
m.wereski at partner.samsung.com


More information about the systemd-devel mailing list