Skip to content

Commit

Permalink
Merge pull request gerard#60 from equitably/new_branch
Browse files Browse the repository at this point in the history
Round up when calculating number of block groups
  • Loading branch information
gerard authored Sep 29, 2020
2 parents ab9ae62 + 389ca79 commit 6b23d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion super.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static uint64_t super_block_group_size(void)

static uint32_t super_n_block_groups(void)
{
uint32_t n = super.s_blocks_count_lo / super.s_blocks_per_group;
uint32_t n = (super.s_blocks_count_lo + super.s_blocks_per_group - 1) / super.s_blocks_per_group;
return n ? n : 1;
}

Expand Down

0 comments on commit 6b23d8d

Please sign in to comment.