Skip to content

Commit 04f635e

Browse files
author
Kent Overstreet
committed
bcachefs: Delete incorrect BTREE_ID_NR assertion
for forwards compat we now explicitly allow mounting and using filesystems with unknown btrees, and we have to walk them for fsck. Signed-off-by: Kent Overstreet <[email protected]>
1 parent 1c8cc24 commit 04f635e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

fs/bcachefs/btree_iter.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,8 @@ static void bch2_btree_path_verify(struct btree_trans *trans,
221221
struct btree_path *path)
222222
{
223223
struct bch_fs *c = trans->c;
224-
unsigned i;
225-
226-
EBUG_ON(path->btree_id >= BTREE_ID_NR);
227224

228-
for (i = 0; i < (!path->cached ? BTREE_MAX_DEPTH : 1); i++) {
225+
for (unsigned i = 0; i < (!path->cached ? BTREE_MAX_DEPTH : 1); i++) {
229226
if (!path->l[i].b) {
230227
BUG_ON(!path->cached &&
231228
bch2_btree_id_root(c, path->btree_id)->b->c.level > i);
@@ -251,8 +248,6 @@ static void bch2_btree_iter_verify(struct btree_iter *iter)
251248
{
252249
struct btree_trans *trans = iter->trans;
253250

254-
BUG_ON(iter->btree_id >= BTREE_ID_NR);
255-
256251
BUG_ON(!!(iter->flags & BTREE_ITER_cached) != btree_iter_path(trans, iter)->cached);
257252

258253
BUG_ON((iter->flags & BTREE_ITER_is_extents) &&

0 commit comments

Comments
 (0)