diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-31 11:21:46 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-10 15:34:08 -0400 |
commit | 656f05d8bd65bd9cc4a07364e9497af55b09e436 (patch) | |
tree | 407c781ab85c2cde7e896552a56076081d108a53 /fs/bcachefs/journal_io.c | |
parent | 4f70176cb9df0ef452615a64084c3ad70e11c275 (diff) | |
download | linux-stable-656f05d8bd65bd9cc4a07364e9497af55b09e436.tar.gz linux-stable-656f05d8bd65bd9cc4a07364e9497af55b09e436.tar.bz2 linux-stable-656f05d8bd65bd9cc4a07364e9497af55b09e436.zip |
bcachefs: Split out journal workqueue
We don't want journal write completions to be blocked behind btree
transactions - io_complete_wq is used for btree updates after data and
metadata writes.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r-- | fs/bcachefs/journal_io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 47805193f18c..5dcb4f4ceae7 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -1648,7 +1648,7 @@ static CLOSURE_CALLBACK(journal_write_done) if (!journal_state_count(new, new.unwritten_idx) && journal_last_unwritten_seq(j) <= journal_cur_seq(j)) { spin_unlock(&j->lock); - closure_call(&j->io, bch2_journal_write, c->io_complete_wq, NULL); + closure_call(&j->io, bch2_journal_write, j->wq, NULL); } else if (journal_last_unwritten_seq(j) == journal_cur_seq(j) && new.cur_entry_offset < JOURNAL_ENTRY_CLOSED_VAL) { struct journal_buf *buf = journal_cur_buf(j); @@ -1661,7 +1661,7 @@ static CLOSURE_CALLBACK(journal_write_done) */ spin_unlock(&j->lock); - mod_delayed_work(c->io_complete_wq, &j->write_work, max(0L, delta)); + mod_delayed_work(j->wq, &j->write_work, max(0L, delta)); } else { spin_unlock(&j->lock); } @@ -1731,7 +1731,7 @@ static CLOSURE_CALLBACK(do_journal_write) le64_to_cpu(w->data->seq); } - continue_at(cl, journal_write_done, c->io_complete_wq); + continue_at(cl, journal_write_done, j->wq); } static int bch2_journal_write_prep(struct journal *j, struct journal_buf *w) @@ -1998,12 +1998,12 @@ CLOSURE_CALLBACK(bch2_journal_write) } } - continue_at(cl, do_journal_write, c->io_complete_wq); + continue_at(cl, do_journal_write, j->wq); return; no_io: - continue_at(cl, journal_write_done, c->io_complete_wq); + continue_at(cl, journal_write_done, j->wq); return; err: bch2_fatal_error(c); - continue_at(cl, journal_write_done, c->io_complete_wq); + continue_at(cl, journal_write_done, j->wq); } |