Fix contradictory runtime-enable status messaging - #19
Merged
Conversation
samwise's run showed the exact gap: the zpool write was denied (lockdown), which set RUNTIME_OK=false and printed "it isn't live yet" — but the enabled=1 write succeeded independently, so zswap actually was live, just not necessarily on the zsmalloc backend. The final summary then unconditionally claimed "reboot isn't required (zswap is already live)" regardless of what actually happened in Step 3. Now the Result section reads back and prints zpool (previously missing entirely, so there was no way to see the write had failed), and the final message is derived from the four read-back values compared against what was requested, not from whether every individual sysfs write in Step 3 succeeded.
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.
Summary
Found on samwise's actual
--applyrun: thezpoolsysfs write was denied (lockdown), which setRUNTIME_OK=falseand printed "zswap ... isn't live yet" — but theenabled=1write succeeded independently ofzpool, so zswap actually was live, just potentially not on thezsmallocbackend. The final summary then unconditionally said "reboot isn't required (zswap is already live)" regardless of what Step 3 actually managed.Resultsection now also printszswap zpool(previously missing — there was no way to see that specific write had failed from the output).Test plan
bash -nsyntax check passes