mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 07:04:44 +00:00
bcachefs: Avoid deadlocking on the allocator
The allocator needs to make sure there's buckets available on the RESERVE_NONE freelist if at all possible - otherwise foreground IO will get stuck. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f4b613410c
commit
4d13e818f5
1 changed files with 1 additions and 1 deletions
|
@ -1164,7 +1164,7 @@ static int bch2_allocator_thread(void *arg)
|
|||
*/
|
||||
if (!nr ||
|
||||
(nr < ALLOC_SCAN_BATCH(ca) &&
|
||||
!fifo_full(&ca->free[RESERVE_MOVINGGC]))) {
|
||||
!fifo_empty(&ca->free[RESERVE_NONE]))) {
|
||||
ret = wait_buckets_available(c, ca);
|
||||
if (ret) {
|
||||
up_read(&c->gc_lock);
|
||||
|
|
Loading…
Reference in a new issue