Loading fs/bcachefs/btree_write_buffer.c +2 −0 Original line number Diff line number Diff line Loading @@ -590,7 +590,9 @@ static int bch2_journal_keys_to_write_buffer(struct bch_fs *c, struct journal_bu entry->type = BCH_JSET_ENTRY_btree_keys; } spin_lock(&c->journal.lock); buf->need_flush_to_write_buffer = false; spin_unlock(&c->journal.lock); out: bch2_journal_keys_to_write_buffer_end(c, &dst); return ret; Loading fs/bcachefs/journal_io.c +11 −6 Original line number Diff line number Diff line Loading @@ -1831,7 +1831,10 @@ static int bch2_journal_write_prep(struct journal *j, struct journal_buf *w) if (wb.wb) bch2_journal_keys_to_write_buffer_end(c, &wb); spin_lock(&c->journal.lock); w->need_flush_to_write_buffer = false; spin_unlock(&c->journal.lock); start = end = vstruct_last(jset); Loading Loading @@ -1949,12 +1952,20 @@ CLOSURE_CALLBACK(bch2_journal_write) unsigned nr_rw_members = 0; int ret; for_each_rw_member(c, ca) nr_rw_members++; BUG_ON(BCH_SB_CLEAN(c->disk_sb.sb)); BUG_ON(!w->write_started); BUG_ON(w->write_allocated); BUG_ON(w->write_done); j->write_start_time = local_clock(); spin_lock(&j->lock); if (nr_rw_members > 1) w->separate_flush = true; ret = bch2_journal_write_pick_flush(j, w); spin_unlock(&j->lock); if (ret) Loading Loading @@ -2009,12 +2020,6 @@ CLOSURE_CALLBACK(bch2_journal_write) if (c->opts.nochanges) goto no_io; for_each_rw_member(c, ca) nr_rw_members++; if (nr_rw_members > 1) w->separate_flush = true; /* * Mark journal replicas before we submit the write to guarantee * recovery will find the journal entries after a crash. Loading Loading
fs/bcachefs/btree_write_buffer.c +2 −0 Original line number Diff line number Diff line Loading @@ -590,7 +590,9 @@ static int bch2_journal_keys_to_write_buffer(struct bch_fs *c, struct journal_bu entry->type = BCH_JSET_ENTRY_btree_keys; } spin_lock(&c->journal.lock); buf->need_flush_to_write_buffer = false; spin_unlock(&c->journal.lock); out: bch2_journal_keys_to_write_buffer_end(c, &dst); return ret; Loading
fs/bcachefs/journal_io.c +11 −6 Original line number Diff line number Diff line Loading @@ -1831,7 +1831,10 @@ static int bch2_journal_write_prep(struct journal *j, struct journal_buf *w) if (wb.wb) bch2_journal_keys_to_write_buffer_end(c, &wb); spin_lock(&c->journal.lock); w->need_flush_to_write_buffer = false; spin_unlock(&c->journal.lock); start = end = vstruct_last(jset); Loading Loading @@ -1949,12 +1952,20 @@ CLOSURE_CALLBACK(bch2_journal_write) unsigned nr_rw_members = 0; int ret; for_each_rw_member(c, ca) nr_rw_members++; BUG_ON(BCH_SB_CLEAN(c->disk_sb.sb)); BUG_ON(!w->write_started); BUG_ON(w->write_allocated); BUG_ON(w->write_done); j->write_start_time = local_clock(); spin_lock(&j->lock); if (nr_rw_members > 1) w->separate_flush = true; ret = bch2_journal_write_pick_flush(j, w); spin_unlock(&j->lock); if (ret) Loading Loading @@ -2009,12 +2020,6 @@ CLOSURE_CALLBACK(bch2_journal_write) if (c->opts.nochanges) goto no_io; for_each_rw_member(c, ca) nr_rw_members++; if (nr_rw_members > 1) w->separate_flush = true; /* * Mark journal replicas before we submit the write to guarantee * recovery will find the journal entries after a crash. Loading