1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
The systemd System and Service Manager
Go to file
Jun'ichi Nomura 1d086a6e59 mount: mark an existing "mounting" unit from /proc/self/mountinfo as "just_mounted"
When starting a mount unit, systemd invokes mount command and moves the
unit's internal state to "mounting".  Then it watches for updates of
/proc/self/mountinfo.  When the expected mount entry newly appears in
mountinfo, the unit internal state is changed to "mounting-done".
Finally, when systemd finds the mount command has finished, it checks
whether the unit internal state is "mounting-done" and changes the state
to "mounted".
If the state was not "mounting-done" in the last step though mount command
was successfully finished, the unit is marked as "failed" with following
log messages:
  Mount process finished, but there is no mount.
  Failed with result 'protocol'.

If daemon-reload is done in parallel with starting mount unit, it is
possible that things happen in following order and result in above failure.
  1. the mount unit state changes to "mounting"
  2. daemon-reload saves the unit state
  3. kernel completes the mount and /proc/self/mountinfo is updated
  4. daemon-reload restores the saved unit state, that is "mounting"
  5. systemd notices the mount command has finished but the unit state
     is still "mounting" though it should be "mounting-done"

mount_setup_existing_unit() should take into account that MOUNT_MOUNTING
is transitional state and set MOUNT_PROC_JUST_MOUNTED flag if the unit
comes from /proc/self/mountinfo so that mount_process_proc_self_mountinfo()
later can make state transition from "mounting" to "mounting-done".

Fixes: #10872
2020-01-14 12:15:09 +01:00
.github github: use systemd.io links in issue template 2019-12-16 09:49:51 +01:00
.lgtm/cpp-queries
.mkosi
catalog
coccinelle
docs docs: update link and more dots 2020-01-13 21:03:15 +01:00
factory/etc
hwdb.d hwdb: Entry for Lenovo Ideapad 310S-14ISK Alps Touchpad 2020-01-13 17:42:30 +01:00
man Merge pull request #14555 from poettering/table-multine 2020-01-14 06:48:57 +09:00
modprobe.d
network network: set AlternativeNamesPolicy= in 99-default.link 2019-12-17 15:44:48 +09:00
po Update Galician translations 2020-01-02 13:36:04 +01:00
presets
rules.d udev: don't import parent ID_FS_ data on partitions 2020-01-09 11:20:55 +01:00
semaphoreci semaphore: switch branch to debian/master 2019-11-30 19:05:53 +01:00
shell-completion bash-completion: do not ellipsize machine name 2020-01-10 12:29:02 +09:00
src mount: mark an existing "mounting" unit from /proc/self/mountinfo as "just_mounted" 2020-01-14 12:15:09 +01:00
sysctl.d
sysusers.d
test test-network: simplify wait_online() by calling wait_operstate() 2020-01-09 15:19:19 -05:00
tmpfiles.d resolved, networkd: don't resolve the user if not root 2019-12-07 18:55:54 +02:00
tools test: pin meson to 0.52.1 for fuzzit/fuzzbuzz 2020-01-08 13:56:30 +03:00
travis-ci test: pin meson to 0.52.1 for fuzzit/fuzzbuzz 2020-01-08 13:56:30 +03:00
units units: tweaks to modprobe@.service 2020-01-07 18:54:24 +01:00
xorg
.ctags
.dir-locals.el
.editorconfig
.gitattributes
.gitignore
.lgtm.yml
.mailmap
.travis.yml
.vimrc
.ycm_extra_conf.py
azure-pipelines.yml
configure
fuzzbuzz.yaml test: pin meson to 0.52.1 for fuzzit/fuzzbuzz 2020-01-08 13:56:30 +03:00
LICENSE.GPL2
LICENSE.LGPL2.1
Makefile
meson_options.txt network, meson: allow statically linked build 2020-01-08 09:50:32 +01:00
meson.build network, meson: allow statically linked build 2020-01-08 09:50:32 +01:00
mkosi.build
mkosi.default
NEWS Fixup typo in NEWS 2019-12-03 08:02:24 +09:00
README Revert "Drop dbus activation stub service" 2019-12-20 17:28:12 +01:00
README.md minor: avoid double title 2019-12-11 19:57:57 +01:00
TODO systemctl: show 'VENDOR PRESET' column in 'list-unit-files' 2020-01-02 15:35:40 +01:00
zanata.xml

Systemd

System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI Build Status
Coverity Scan Status
Fuzzit Status
OSS-Fuzz Status
CII Best Practices
Travis CI Build Status
Language Grade: C/C++
CentOS CI Build Status
Build Status

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements is 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 guide for information on 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.

Stable branches with backported patches are available in the stable repo.