mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
bcachefs: Fix allocate -> self healing path
When we go to allocate and find taht a bucket in the freespace btree is actually allocated, we're supposed to return nonzero to tell the allocator to skip it. This fixes an emergency read only due to a bucket/ptr gen mismatch - we also don't return the correct bucket gen when this happens. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
016c4b48b8
commit
f351d91edd
|
|
@ -1475,6 +1475,8 @@ int bch2_check_discard_freespace_key(struct btree_trans *trans, struct btree_ite
|
|||
w->c = c;
|
||||
w->pos = BBPOS(iter->btree_id, iter->pos);
|
||||
queue_work(c->write_ref_wq, &w->work);
|
||||
|
||||
ret = 1; /* don't allocate from this bucket */
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user