Avoid remounting already mounted /run and /tmp directories #408
+19
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a patch for finit 4.8 beta 1.
It adds the function fistmpfs to determine if a new tmpfs mount should be performed on /run and /tmp. The function supports cases where more complex mount hierarchies are in use, including overlayfs backed mounts.
In our system, /tmp is a symbolic link to a subdirectory in an overlayfs mount. This means that /tmp does not explicitly show up in /proc/mounts, so in fs_finalize, finit decides to mount a new tmpfs on top of it.
This turns out to be problematic for our smallest systems where the new tmpfs on /tmp is not large enough.
I do realize this may be a bit particular to our specific setup, but the patch works on our system. Any comments are welcome.