diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-04-20 17:09:25 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:01 -0400 |
commit | f09517fc5136ad2ea67b6f332ed2445f053ccfe6 (patch) | |
tree | 67e6bbf58fb4ce196e2c9b6efbc8df4dda5426bf /fs/bcachefs/journal_reclaim.c | |
parent | 6adaac0b95dd39da290f6006822fbf7560d2d1b5 (diff) | |
download | linux-f09517fc5136ad2ea67b6f332ed2445f053ccfe6.tar.gz linux-f09517fc5136ad2ea67b6f332ed2445f053ccfe6.tar.bz2 linux-f09517fc5136ad2ea67b6f332ed2445f053ccfe6.zip |
bcachefs: Fix a deadlock on journal reclaim
Flushing the btree key cache needs to use allocation reserves - journal
reclaim depends on flushing the btree key cache for making forward
progress, and the allocator and copygc depend on journal reclaim making
forward progress.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.c')
-rw-r--r-- | fs/bcachefs/journal_reclaim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index e2086c76d104..416f8611f008 100644 --- a/fs/bcachefs/journal_reclaim.c +++ b/fs/bcachefs/journal_reclaim.c @@ -634,7 +634,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct) msecs_to_jiffies(j->reclaim_delay_ms))) min_nr = 1; - if (j->prereserved.reserved * 2 > j->prereserved.remaining) + if (j->prereserved.reserved * 4 > j->prereserved.remaining) min_nr = 1; if (fifo_free(&j->pin) <= 32) |