c44cac7c6c43407d28bd8daebff39f6145a2a33e
The linux umount2() systemcall accepts a MNT_FORCE flags which some filesystems honor, particularly FUSE and various network filesystems such as NFS. These filesystems can sometimes wait for an indefinite period for a response from an external service, and the wait if sometimes "uninterruptible" meaning that the process cannot be killed. Using MNT_FORCE causes any such request that are outstanding to be aborted. This normally allows the waiting process to be killed. It will then realease and reference it has to the filesytem, this allowing the filesystem to be unmounted. If there remain active references to the filesystem, MNT_FORCE is *not* forcefull enough to unmount the filesystem anyway. By the time that umount_all() is run by systemd-shutdown, all filesystems *should* be unmounted, and sync() will have been called. Anything that remains cannot be unmounted in a completely clean manner and just nees to be dealt with as firmly as possible. So use MNT_FORCE and try to explain why in the comment. Also enhance an earlier comment to explain why umount2() is safe even though mount(MNT_REMOUNT) isn't.
systemd - System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements are provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the HACKING file for information how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Languages
C
88.5%
Shell
5.7%
Python
4.6%
Meson
1.1%