summaryrefslogtreecommitdiff
path: root/libbcachefs/journal.h
diff options
context:
space:
mode:
authorAleksei Kharlamov <der@2-47.ru>2022-02-26 18:05:28 +0100
committerAleksei Kharlamov <der@2-47.ru>2022-02-26 21:31:11 +0100
commit63805882d4a60de63ed82d81ef4cfbb6e499753a (patch)
tree682f0c0b33175883f87c9c597a597a5a7644c358 /libbcachefs/journal.h
parent5528e3ae62ead1cfd5be36c1712d1a2dd5ccb3af (diff)
Update bcachefs sources to 31718a2: bcachefs: Don't spin in journal reclaim
Signed-off-by: Aleksei Kharlamov <aleksei@devass.club>
Diffstat (limited to 'libbcachefs/journal.h')
-rw-r--r--libbcachefs/journal.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbcachefs/journal.h b/libbcachefs/journal.h
index b2988732..29698174 100644
--- a/libbcachefs/journal.h
+++ b/libbcachefs/journal.h
@@ -374,7 +374,7 @@ static inline bool journal_check_may_get_unreserved(struct journal *j)
{
union journal_preres_state s = READ_ONCE(j->prereserved);
bool ret = s.reserved < s.remaining &&
- fifo_free(&j->pin) > 8;
+ fifo_free(&j->pin) > j->pin.size / 4;
lockdep_assert_held(&j->lock);
@@ -433,7 +433,6 @@ static inline int bch2_journal_preres_get_fast(struct journal *j,
ret = 0;
if ((flags & JOURNAL_RES_GET_RESERVED) ||
- test_bit(JOURNAL_NOCHANGES, &j->flags) ||
new.reserved + d < new.remaining) {
new.reserved += d;
ret = 1;