Commit 60f2b1bc authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Add asserts to bch2_dev_btree_bitmap_marked_sectors()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 427e1bb8
......@@ -415,6 +415,9 @@ static void __bch2_dev_btree_bitmap_mark(struct bch_sb_field_members_v2 *mi, uns
m->btree_bitmap_shift += resize;
}
BUG_ON(m->btree_bitmap_shift > 57);
BUG_ON(end > 64ULL << m->btree_bitmap_shift);
for (unsigned bit = start >> m->btree_bitmap_shift;
(u64) bit << m->btree_bitmap_shift < end;
bit++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment