diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-20 12:53:06 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-25 17:37:12 -0500 |
commit | 23686c1e39538aae4a418e6497d8b00696c471bd (patch) | |
tree | 94e6da739347562a895e61ca5b2d1c7ea5186bc7 | |
parent | 4c0ccee9fed6f79bf8a15ebe66d2ca59be24d013 (diff) |
bcachefs: Make sure bch2_bucket_alloc_new_fs() obeys buckets_nouse
This fixes the filesystem migrate tool.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 2bb107b8b0b9..dce77cc27cbe 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -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; |