mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
bcachefs: Fix bch2_dev_btree_bitmap_marked_sectors() shift
Fixes: 27c15ed297
bcachefs: bch_member.btree_allocated_bitmap
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
79055f50a6
commit
fa845c7349
@ -463,8 +463,8 @@ static void __bch2_dev_btree_bitmap_mark(struct bch_sb_field_members_v2 *mi, uns
|
||||
m->btree_bitmap_shift += resize;
|
||||
}
|
||||
|
||||
for (unsigned bit = sectors >> m->btree_bitmap_shift;
|
||||
bit << m->btree_bitmap_shift < end;
|
||||
for (unsigned bit = start >> m->btree_bitmap_shift;
|
||||
(u64) bit << m->btree_bitmap_shift < end;
|
||||
bit++)
|
||||
bitmap |= BIT_ULL(bit);
|
||||
|
||||
|
@ -235,11 +235,11 @@ static inline bool bch2_dev_btree_bitmap_marked_sectors(struct bch_dev *ca, u64
|
||||
{
|
||||
u64 end = start + sectors;
|
||||
|
||||
if (end > 64 << ca->mi.btree_bitmap_shift)
|
||||
if (end > 64ULL << ca->mi.btree_bitmap_shift)
|
||||
return false;
|
||||
|
||||
for (unsigned bit = sectors >> ca->mi.btree_bitmap_shift;
|
||||
bit << ca->mi.btree_bitmap_shift < end;
|
||||
for (unsigned bit = start >> ca->mi.btree_bitmap_shift;
|
||||
(u64) bit << ca->mi.btree_bitmap_shift < end;
|
||||
bit++)
|
||||
if (!(ca->mi.btree_allocated_bitmap & BIT_ULL(bit)))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user