summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_reclaim.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-12-03 21:23:58 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:49 +0300
commitafa7cb0c36bd511362bcb03c6db8af74186176bf (patch)
tree5cdc1e955ffbfdab2e4b3a573988d1507b10b433 /fs/bcachefs/journal_reclaim.h
parent33c74e4119a91c3ae87fc207777e34fdbb613c66 (diff)
downloadlinux-afa7cb0c36bd511362bcb03c6db8af74186176bf.tar.xz
bcachefs: Check for errors in bch2_journal_reclaim()
If the journal is halted, journal reclaim won't necessarily be able to make any forward progress, and won't accomplish anything anyways - we should bail out so that we don't get stuck looping in reclaim when the caches are too dirty and we should be shutting down. 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.h')
-rw-r--r--fs/bcachefs/journal_reclaim.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_reclaim.h b/fs/bcachefs/journal_reclaim.h
index e25355042e6e..3404fef241ea 100644
--- a/fs/bcachefs/journal_reclaim.h
+++ b/fs/bcachefs/journal_reclaim.h
@@ -73,7 +73,7 @@ static inline void bch2_journal_pin_update(struct journal *j, u64 seq,
void bch2_journal_pin_flush(struct journal *, struct journal_entry_pin *);
void bch2_journal_do_discards(struct journal *);
-void bch2_journal_reclaim(struct journal *);
+int bch2_journal_reclaim(struct journal *);
void bch2_journal_reclaim_stop(struct journal *);
int bch2_journal_reclaim_start(struct journal *);