From c51a0d0f452e4430da90cc20f3e080c10ea104ce Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Wed, 16 Oct 2013 11:38:21 +0300 Subject: [PATCH] systemd: order remote mounts from mountinfo before remote-fs.target --- ...mounts-from-mountinfo-before-remote-.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch diff --git a/packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch b/packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch new file mode 100644 index 0000000000..e1baf85d86 --- /dev/null +++ b/packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch @@ -0,0 +1,38 @@ +From 77009452cfd25208509b14ea985e81fdf9f7d40e Mon Sep 17 00:00:00 2001 +From: Zbigniew Jędrzejewski-Szmek +Date: Fri, 04 Oct 2013 02:15:08 +0000 +Subject: systemd: order remote mounts from mountinfo before remote-fs.target + +Usually the network is stopped before filesystems are umounted. +Ordering network filesystems before remote-fs.target means that their +unmounting will be performed earlier, and can terminate sucessfully. + +https://bugs.freedesktop.org/show_bug.cgi?id=70002 +--- +(limited to 'src/core/mount.c') + +diff --git a/src/core/mount.c b/src/core/mount.c +index 3d46557..93bfa99 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -1440,6 +1440,9 @@ static int mount_add_one( + + u = manager_get_unit(m, e); + if (!u) { ++ const char* const target = ++ fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; ++ + delete = true; + + u = unit_new(m, sizeof(Mount)); +@@ -1466,7 +1469,7 @@ static int mount_add_one( + goto fail; + } + +- r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true); ++ r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true); + if (r < 0) + goto fail; + +-- +cgit v0.9.0.2-2-gbebe