summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-10-23 22:11:04 +0200
committerAndreas Oberritter <obi@opendreambox.org>2015-02-23 17:15:53 +0100
commitec51de464e32ecf97336ae88985140ce36cf30cd (patch)
treed06c137e4d63a9f5353a4c1f178435d570396c8e
parentea38b80a2aa6cf71f55aca8594fbfd2244988909 (diff)
downloadopenembedded-core-contrib-ec51de464e32ecf97336ae88985140ce36cf30cd.tar.gz
openembedded-core-contrib-ec51de464e32ecf97336ae88985140ce36cf30cd.tar.bz2
openembedded-core-contrib-ec51de464e32ecf97336ae88985140ce36cf30cd.zip
systemd: backport patch to fix remote fs unmounts on reboot
Remote filesystems used to get unmounted after networking had already been shut down. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/recipes-core/systemd/systemd/order-remote-mounts-from-mountinfo-before-remote-fs-target.patch45
-rw-r--r--meta/recipes-core/systemd/systemd_206.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/order-remote-mounts-from-mountinfo-before-remote-fs-target.patch b/meta/recipes-core/systemd/systemd/order-remote-mounts-from-mountinfo-before-remote-fs-target.patch
new file mode 100644
index 0000000000..feae4c681a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/order-remote-mounts-from-mountinfo-before-remote-fs-target.patch
@@ -0,0 +1,45 @@
+Upstream-Status: Backport
+
+From 3cc758386909bf1ae2e3305ca6c6355e223bfc8a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 3 Oct 2013 22:15:08 -0400
+Subject: [PATCH] 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
+(cherry picked from commit 77009452cfd25208509b14ea985e81fdf9f7d40e)
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+---
+ src/core/mount.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/mount.c b/src/core/mount.c
+index c7d29b0..17c4cfc 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -1513,6 +1513,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));
+@@ -1539,7 +1542,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;
+
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_206.bb b/meta/recipes-core/systemd/systemd_206.bb
index 472f2d1d67..f64972d989 100644
--- a/meta/recipes-core/systemd/systemd_206.bb
+++ b/meta/recipes-core/systemd/systemd_206.bb
@@ -23,6 +23,7 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
file://binfmt-install.patch \
file://journald-fix-fd-leak-in-journal_file_empty.patch \
file://journald-fix-vacuuming-of-archived-journals.patch \
+ file://order-remote-mounts-from-mountinfo-before-remote-fs-target.patch \
file://touchscreen.rules \
${UCLIBCPATCHES} \
file://00-create-volatile.conf \