Repository navigation
work around linux 5.15 ioprio API breakage - #21503
Merged
Merged
Conversation
No actual code changes, just some splitting out.
IOPRIO_CLASS_NONE with any priority value actually is an alias for IOPRIO_CLASS_BE with priority value 4 – which is the default ioprio for all processes. We got this right at one place, but wrong at three others (where we assumed the default value was 0, not 4). Let's add a macro that encodes this properly, and use it everywhere.
Let's always say IOPRIO_CLASS_BE when IOPRIO_CALSS_NONE is set.
Linux 5.15 broke API in ioprio_get(): instead of returning IOPRIO_CLASS_NONE when that's set it now returns IOPRIO_CLASS_BE, which is what this actually is (the former is just an alias for the latter with a priority value of 4). Let's hide the differences between old and new kernels here, and always normalize to what the new kernels do.
poettering
force-pushed
the
ioprio-fix
branch
from
November 24, 2021 15:12
995157f to
020e238
Compare
Let's not mention a redundant setting of "none". Let's instead only mention "best-effort", which is the same. Also mention the default settings properly. (Also, while we are at it, don#t document the numeric alias, that's totally redundant and harder to use, so no need to push people towards it.)
Linux 5.15 broke kernel API: torvalds/linux@e70344c Previously setting IOPRIO_CLASS_NONE for a process would then report IOPRIO_CLASS_NONE back. But since 5.15 it reports IOPRIO_CLASS_BE instead. Since IOPRIO_CLASS_NONE is an alias for a special setting of IOPRIO_CLASS_BE this makes some sense, but it's also a kernel API breakage that our testsuite trips up on. (I made some minimal effort to inform the kernel people about this API breakage during the 5.15 rc phase, but noone was interested.) Either way let's hadle this gracefully in our test suite and accept "best-effort" too when "none" was set. (This is only triggable if the tests are run on 5.15 with full privs)
poettering
force-pushed
the
ioprio-fix
branch
from
November 24, 2021 15:15
020e238 to
d9b8771
Compare
mrc0mmand
added a commit
to mrc0mmand/systemd-centos-ci
that referenced
this pull request
Nov 25, 2021
This reverts commit bb79a5d. See: systemd/systemd#21503
mrc0mmand
added a commit
to systemd/systemd-centos-ci
that referenced
this pull request
Nov 25, 2021
This reverts commit bb79a5d. See: systemd/systemd#21503
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.