Merged
Conversation
When probabilistic_test() in find_cache_size() finds a bad block, find_cache_size() calls assess_reset_effect() to decide the cache size. assess_reset_effect(), in turn, calls count_good_blocks() to counts how many good blocks are in the region under test. probabilistic_test() performs sparse random reads, whereas count_good_blocks() reads large chunks sequentially (1MB at a time). Some fake drives have a "tiny" (e.g. 8KB) cache for random accesses and a "large" (e.g. 4MB) cache for sequential accesses. So, for these fake drives, it is possible for probabilistic_test() to find a bad block and count_good_blocks() to find no bad blocks. This situation has been verified with the donated drive from issue #50. The example cache sizes come from the following discussion among Linux kernel developers: https://linux-arm-kernel.infradead.narkive.com/h3crV0D3/mmc-quirks-relating-to-performance-lifetime This commit removes assess_reset_effect() and count_good_blocks(), so f3probe only issues random reads to circunvent the problem. As a side effect of removing count_good_blocks(), there is no longer need to call dev_reset(). Therefore this commit also removes all code associated with resetting the drive under test.
The new probing algorithm will hopefully eliminate false negatives, that is, drives that f3probe identifies as good but are actually fake; see issue #247 for an example.
Since f3probe no longer uses drive resets to probe a drive, there is no need to report reset statistics.
This patch removes a bias toward higher values that the current uint64_rand() has.
This commit reviews probe_device_max_blocks() to account for the new probing algorithm.
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.