bcachefs: Add an assertion to check for journal writes to same location
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
d042b0402c
commit
a28bd48a7f
@ -473,6 +473,7 @@ struct bch_dev {
|
||||
atomic64_t rebalance_work;
|
||||
|
||||
struct journal_device journal;
|
||||
u64 prev_journal_sector;
|
||||
|
||||
struct work_struct io_error_work;
|
||||
|
||||
|
@ -1286,6 +1286,9 @@ static void do_journal_write(struct closure *cl)
|
||||
bio->bi_end_io = journal_write_endio;
|
||||
bio->bi_private = ca;
|
||||
|
||||
BUG_ON(bio->bi_iter.bi_sector == ca->prev_journal_sector);
|
||||
ca->prev_journal_sector = bio->bi_iter.bi_sector;
|
||||
|
||||
if (!JSET_NO_FLUSH(w->data))
|
||||
bio->bi_opf |= REQ_FUA;
|
||||
if (!JSET_NO_FLUSH(w->data) && !w->separate_flush)
|
||||
|
Loading…
Reference in New Issue
Block a user