summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-04-28 22:12:07 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:02 -0400
commit2ce867df3161886cfc6baf54aa9ef53f2281cdee (patch)
treef697ed2cb9bc3791e11629154f8582f0f7c8c016 /fs/bcachefs/journal.c
parent050197b1c1df1cfee84523bf2183c8674e06d10f (diff)
bcachefs: Make sure to initialize j->last_flushed
If the journal reclaim thread makes it to the timeout without ever initializing j->last_flushed, we could end up sleeping for a very long time. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal.c')
-rw-r--r--fs/bcachefs/journal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c
index 2724a58ada05..a70540853586 100644
--- a/fs/bcachefs/journal.c
+++ b/fs/bcachefs/journal.c
@@ -1189,6 +1189,8 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
"nr noflush writes:\t%llu\n"
"nr direct reclaim:\t%llu\n"
"nr background reclaim:\t%llu\n"
+ "reclaim kicked:\t\t%u\n"
+ "reclaim runs in:\t%u ms\n"
"current entry sectors:\t%u\n"
"current entry error:\t%u\n"
"current entry:\t\t",
@@ -1204,6 +1206,8 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
j->nr_noflush_writes,
j->nr_direct_reclaim,
j->nr_background_reclaim,
+ j->reclaim_kicked,
+ jiffies_to_msecs(j->next_reclaim - jiffies),
j->cur_entry_sectors,
j->cur_entry_error);