Commit 6be1b6d9 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Make sure bch2_bucket_alloc_new_fs() obeys buckets_nouse

This fixes the filesystem migrate tool.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 6df893fb
......@@ -152,6 +152,7 @@ long bch2_bucket_alloc_new_fs(struct bch_dev *ca)
for (b = buckets->first_bucket; b < buckets->nbuckets; b++)
if (is_available_bucket(buckets->b[b].mark) &&
(!ca->buckets_nouse || !test_bit(b, ca->buckets_nouse)) &&
!buckets->b[b].mark.owned_by_allocator)
goto success;
b = -1;
......
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