summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/journal_reclaim.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-12-05 02:07:19 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:09:18 +0200
commit2430e72f42778a9448ff386686856b61b49f5074 (patch)
treee24bdbedd9ff95a5c6d165e5feceeae4094d3440 /fs/bcachefs/journal_reclaim.c
parentbcachefs: Fix btree_path leaks in bch2_trans_update() (diff)
downloadlinux-2430e72f42778a9448ff386686856b61b49f5074.tar.xz
linux-2430e72f42778a9448ff386686856b61b49f5074.zip
bcachefs: Convert journal sysfs params to regular options
This converts journal_write_delay, journal_flush_disabled, and journal_reclaim_delay to normal filesystems options, and also adds them to the superblock. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.c')
-rw-r--r--fs/bcachefs/journal_reclaim.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c
index 3f417af16e59..4462beb52461 100644
--- a/fs/bcachefs/journal_reclaim.c
+++ b/fs/bcachefs/journal_reclaim.c
@@ -637,7 +637,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct)
* make sure to flush at least one journal pin:
*/
if (time_after(jiffies, j->last_flushed +
- msecs_to_jiffies(j->reclaim_delay_ms)))
+ msecs_to_jiffies(c->opts.journal_reclaim_delay)))
min_nr = 1;
if (j->prereserved.reserved * 4 > j->prereserved.remaining)
@@ -683,6 +683,7 @@ int bch2_journal_reclaim(struct journal *j)
static int bch2_journal_reclaim_thread(void *arg)
{
struct journal *j = arg;
+ struct bch_fs *c = container_of(j, struct bch_fs, journal);
unsigned long delay, now;
int ret = 0;
@@ -700,7 +701,7 @@ static int bch2_journal_reclaim_thread(void *arg)
mutex_unlock(&j->reclaim_lock);
now = jiffies;
- delay = msecs_to_jiffies(j->reclaim_delay_ms);
+ delay = msecs_to_jiffies(c->opts.journal_reclaim_delay);
j->next_reclaim = j->last_flushed + delay;
if (!time_in_range(j->next_reclaim, now, now + delay))