block_size is in bytes, not sectors, so when calling round_up(),
we could start rounding up by a way too large size and then overflow
outside the area that migrate allocated for us.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
/* Create two superblocks in the allowed range: */
for (i = 0; i < l->nr_superblocks; i++) {
if (sb_pos != BCH_SB_SECTOR)
- sb_pos = round_up(sb_pos, block_size);
+ sb_pos = round_up(sb_pos, block_size >> 9);
l->sb_offset[i] = cpu_to_le64(sb_pos);
sb_pos += sb_size;