chiark / gitweb /
split mount_point_is_api() and mount_point_ignore()
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 11 Nov 2010 10:15:16 +0000 (11:15 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 11 Nov 2010 10:15:16 +0000 (11:15 +0100)
We should not handle the ignore list as API mounts, as
systemd itself never touches them.

On Thu, Nov 11, 2010 at 10:34, Andreas Jaeger <aj@novell.com> wrote:
>
> I noticed for some time that systemd-remount-api-vfs is in the
> failed state and found now the following in the log files
>
> systemd-remount-api-vfs[467]: /bin/mount for /proc/bus/usb exited with exit status 32.
> systemd-remount-api-vfs[467]: mount: /proc/bus/usb not mounted already, or bad option
> systemd[1]: systemd-remount-api-vfs.service: main process exited, code=exited, status=1
> systemd[1]: Unit systemd-remount-api-vfs.service entered failed state.

src/mount-setup.c
src/mount-setup.h
src/mount.c
src/umount.c

index 84a729ebf21eaf638e7d7f167ea97a0ac0724f91..9eb2832c6ecd6935252b10f1fda44146c40623c0 100644 (file)
@@ -74,11 +74,17 @@ bool mount_point_is_api(const char *path) {
                 if (path_equal(path, mount_table[i].where))
                         return true;
 
+        return path_startswith(path, "/sys/fs/cgroup/");
+}
+
+bool mount_point_ignore(const char *path) {
+       unsigned i;
+
         for (i = 0; i < ELEMENTSOF(ignore_paths); i++)
                 if (path_equal(path, ignore_paths[i]))
                         return true;
 
-        return path_startswith(path, "/sys/fs/cgroup/");
+        return false;
 }
 
 static int mount_one(const MountPoint *p) {
index 47d0e5bb121bc8d51d1ab8eb65a1233c22930268..150ec408d20f89ecc13b9b2ff656dd33c5cec886 100644 (file)
@@ -27,5 +27,6 @@
 int mount_setup(void);
 
 bool mount_point_is_api(const char *path);
+bool mount_point_ignore(const char *path);
 
 #endif
index 5d4944abecd79868645925ae1ee4aa0b7db70610..4094eef43d88f9fe6cf39c5448649c5dbbc2e7e3 100644 (file)
@@ -1213,6 +1213,8 @@ static int mount_add_one(
          * dependencies ever. */
         if (mount_point_is_api(where))
                 return 0;
+        if (mount_point_ignore(where))
+                return 0;
 
         if (streq(fstype, "autofs"))
                 return 0;
index 0081d979d9d0128fd99ffa179dcebffc943d6484..2ae8f86ecd103cc98ff01dee344343a2f7a5c1f7 100644 (file)
@@ -105,7 +105,7 @@ static int mount_points_list_get(MountPoint **head) {
                         goto finish;
                 }
 
-                if (mount_point_is_api(p)) {
+                if (mount_point_is_api(p) || mount_point_ignore(p)) {
                         free(p);
                         continue;
                 }