cmd/fsck-cmd.py: Test early for par2_parallel, helps with -jN#52
Open
ccorn wants to merge 1 commit into
Open
Conversation
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.
With a recent
par2installed,bup fsck -v -j4(optionally with-gor--quick) outputs messages likeand so on. So the
par2 -t1test is run several times, despite caching attempts incmd/fsck-cmd.py.The fix proposed here moves the associated test from the
par2subroutine topar2_setup. Notes:par2_setup()has been run before any calls topar2take place and before any forking due to-jNhappens. This is currently the case, as a look at the main section offsck-cmd.pyshows._par2_parallelthat stores the result has been renamed topar2_parallelas it is no longer accessed by only one subroutine (though not by subs in other files). The new name rings similar to the other globalpar2_ok. It is left atNoneif the test associated withpar2_okfails.With this patch and the warning fixes from the
fix-par2-t-msgbranch,bup fsck -v -j4now simply reportsjust once, which is as it should be.