|
Zbigniew Jędrzejewski-Szmek |
a52f67 |
From b8bf0aa699014f143f308fb4f8f872c13edff402 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Date: Thu, 3 Oct 2013 22:15:08 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Subject: [PATCH] systemd: order remote mounts from mountinfo before
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
remote-fs.target
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Usually the network is stopped before filesystems are umounted.
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Ordering network filesystems before remote-fs.target means that their
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
unmounting will be performed earlier, and can terminate sucessfully.
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
https://bugs.freedesktop.org/show_bug.cgi?id=70002
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
src/core/mount.c | 5 ++++-
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
1cc3df |
index 3d46557fb1..93bfa99f3f 100644
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
--- a/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+++ b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
@@ -1440,6 +1440,9 @@ static int mount_add_one(
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
u = manager_get_unit(m, e);
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
if (!u) {
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+ const char* const target =
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+ fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
delete = true;
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
u = unit_new(m, sizeof(Mount));
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
@@ -1466,7 +1469,7 @@ static int mount_add_one(
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
goto fail;
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
- r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+ r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
goto fail;
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|