Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Fix failure to detect faults of exactly-full top partition #350

Merged
merged 1 commit into from
May 6, 2020

Conversation

anorth
Copy link
Member

@anorth anorth commented May 6, 2020

I discovered this while looking for the "failed to load fault sectors" error you observed. I don't think this fixes that problem, though.

@anorth anorth requested a review from magik6k May 6, 2020 03:57
firstSector := i * partitionSize
sectorCount := partitionSize
if i == partitionCount-1 {
sectorCount = dlSectorCount % partitionSize
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong if the final partition was exactly full.

@codecov-io
Copy link

Codecov Report

Merging #350 into master will increase coverage by 0.01%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##           master     #350      +/-   ##
==========================================
+ Coverage   37.59%   37.60%   +0.01%     
==========================================
  Files          40       40              
  Lines        4142     4140       -2     
==========================================
  Hits         1557     1557              
+ Misses       2363     2361       -2     
  Partials      222      222              

@whyrusleeping whyrusleeping merged commit ee40198 into master May 6, 2020
@whyrusleeping whyrusleeping deleted the anorth/faultcheck branch May 6, 2020 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants