summaryrefslogtreecommitdiff
path: root/libbcachefs/journal_reclaim.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-29 23:55:51 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2020-11-30 00:06:46 -0500
commit1e574cb1aa07ab3a796c7d6c5501b96f3056ef4d (patch)
treeebcb516a753e19eb83f2dd4ed9b4f851f8afd911 /libbcachefs/journal_reclaim.h
parent41bec63b265a38dd9fa168b6042ea5bf07135048 (diff)
Update bcachefs sources to 021e62a098 bcachefs: Fix error in filesystem initialization
Diffstat (limited to 'libbcachefs/journal_reclaim.h')
-rw-r--r--libbcachefs/journal_reclaim.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/libbcachefs/journal_reclaim.h b/libbcachefs/journal_reclaim.h
index 8128907a..bae2c921 100644
--- a/libbcachefs/journal_reclaim.h
+++ b/libbcachefs/journal_reclaim.h
@@ -10,6 +10,17 @@ enum journal_space_from {
journal_space_clean,
};
+static inline void journal_reclaim_kick(struct journal *j)
+{
+ struct task_struct *p = READ_ONCE(j->reclaim_thread);
+
+ if (p && !j->reclaim_kicked) {
+ j->reclaim_kicked = true;
+ if (p)
+ wake_up_process(p);
+ }
+}
+
unsigned bch2_journal_dev_buckets_available(struct journal *,
struct journal_device *,
enum journal_space_from);
@@ -55,7 +66,9 @@ void bch2_journal_pin_flush(struct journal *, struct journal_entry_pin *);
void bch2_journal_do_discards(struct journal *);
void bch2_journal_reclaim(struct journal *);
-void bch2_journal_reclaim_work(struct work_struct *);
+
+void bch2_journal_reclaim_stop(struct journal *);
+int bch2_journal_reclaim_start(struct journal *);
bool bch2_journal_flush_pins(struct journal *, u64);