Skip to content

Commit

Permalink
Merge pull request #958 from estebanreyl/esrey/exceededMaxSizeBugfix
Browse files Browse the repository at this point in the history
Corrected usedGdBlocks calculation
  • Loading branch information
dcantah authored Mar 8, 2021
2 parents 081ab2f + 153ef5e commit 60a28f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext4/internal/compactext4/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ func (w *Writer) Close() error {
diskSize = minSize
}

usedGdBlocks := (groups-1)/groupDescriptorSize + 1
usedGdBlocks := (groups-1)/groupsPerDescriptorBlock + 1
if usedGdBlocks > w.gdBlocks {
return exceededMaxSizeError{w.maxDiskSize}
}
Expand Down

0 comments on commit 60a28f3

Please sign in to comment.