diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-04 20:07:19 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:18 -0400 |
commit | 2430e72f42778a9448ff386686856b61b49f5074 (patch) | |
tree | e24bdbedd9ff95a5c6d165e5feceeae4094d3440 /fs/bcachefs/journal_reclaim.c | |
parent | 92d2ec10926d2ba8c38ba0ecada69cfd7a4dd3c4 (diff) | |
download | linux-stable-2430e72f42778a9448ff386686856b61b49f5074.tar.gz linux-stable-2430e72f42778a9448ff386686856b61b49f5074.tar.bz2 linux-stable-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.c | 5 |
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)) |