mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 13:27:25 -04:00
bcachefs: journal write path comment
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -1813,6 +1813,10 @@ static CLOSURE_CALLBACK(journal_write_preflush)
|
||||
struct journal *j = container_of(w, struct journal, buf[w->idx]);
|
||||
struct bch_fs *c = container_of(j, struct bch_fs, journal);
|
||||
|
||||
/*
|
||||
* Wait for previous journal writes to comelete; they won't necessarily
|
||||
* be flushed if they're still in flight
|
||||
*/
|
||||
if (j->seq_ondisk + 1 != le64_to_cpu(w->data->seq)) {
|
||||
spin_lock(&j->lock);
|
||||
if (j->seq_ondisk + 1 != le64_to_cpu(w->data->seq)) {
|
||||
|
||||
Reference in New Issue
Block a user