Skip to content

Testing for x-initrd.mount in should_umount() broken? #4817

@3chas3

Description

@3chas3

Submission type

  • Bug report
  • Request for enhancement (RFE)

NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!

systemd version the issue has been seen with

215-17

NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!

Used distribution

Debian 8

In case of bug report: Expected behaviour you didn't see

Marking a mount point with x-initrd.mount didn't keep systemd from attempting to unmount the filesystem during shutdown.

In case of bug report: Unexpected behaviour you saw

Systemd compalins about not being until to unmount said filesystem.

In case of bug report: Steps to reproduce the problem

The following routine attempts to check for x-initrd.mount in the mount options:

static bool should_umount(Mount *m) {
MountParameters *p;

    if (path_equal(m->where, "/") ||
        path_equal(m->where, "/usr"))
            return false;

    p = get_mount_parameters(m);
    if (p && mount_test_option(p->options, "x-initrd.mount") &&
        !in_initrd())
            return false;

    return true;

}

However, p->options is derived from /proc/self/mountinfo -- the x-* flags are not sent to the kernel and therefore they will NOT appear in /proc/self/mountinfo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingpid1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions