needs-restarting: "Regular files" are often on 00:xx devices #559
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.
needs-restarting currently checks the major:minor device of each mmapped file and ignores files from devices with major version 0, considering them "not regular files". According to the kernel docs [1], a major version of 0 is for "unnamed devices, e.g. non-device mounts".
But ignoring files on 00:xx devices seems to not be a valid strategy. From my testing, in containers and in virtual machines especially, "regular files" managed by DNF are often on these devices. For example:
This patch removes this filter so that we just check that a file has a corresponding file path. There are files that have (something that looks like) a file path but are not "regular files", for example:
We should be able to ignore these since they would not be in the RPM database anyway.
[1] https://www.kernel.org/doc/Documentation/admin-guide/devices.txt