From 280249b9d9b9a62562ddeb5429a7d29d2f03ba1c Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 16 Jan 2021 15:40:33 -0500 Subject: bcachefs: Correctly order flushes and journal writes on multi device filesystems All writes prior to a journal write need to be flushed before the journal write itself happens. On single device filesystems, it suffices to mark the write with REQ_PREFLUSH|REQ_FUA, but on multi device filesystems we need to issue flushes to every device - and wait for them to complete - before issuing the journal writes. Previously, we were issuing flushes to every device, but we weren't waiting for them to complete before issuing the journal writes. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/journal_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/bcachefs/journal_types.h') diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h index 150e691d5317..8ad10e46dd5d 100644 --- a/fs/bcachefs/journal_types.h +++ b/fs/bcachefs/journal_types.h @@ -31,6 +31,7 @@ struct journal_buf { unsigned u64s_reserved; bool noflush; /* write has already been kicked off, and was noflush */ bool must_flush; /* something wants a flush */ + bool separate_flush; /* bloom filter: */ unsigned long has_inode[1024 / sizeof(unsigned long)]; }; -- cgit v1.2.3-58-ga151