mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 06:10:45 -04:00
bcachefs: fix last_seq_ondisk
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
658971f276
commit
60476b14b4
@@ -1207,6 +1207,7 @@ static void journal_write_done(struct closure *cl)
|
||||
struct bch_devs_list devs =
|
||||
bch2_extent_devs(bkey_i_to_s_c_extent(&w->key));
|
||||
u64 seq = le64_to_cpu(w->data->seq);
|
||||
u64 last_seq = le64_to_cpu(w->data->last_seq);
|
||||
|
||||
if (!devs.nr) {
|
||||
bch_err(c, "unable to write journal to sufficient devices");
|
||||
@@ -1219,7 +1220,7 @@ static void journal_write_done(struct closure *cl)
|
||||
bch2_time_stats_update(j->write_time, j->write_start_time);
|
||||
|
||||
spin_lock(&j->lock);
|
||||
j->last_seq_ondisk = seq;
|
||||
j->last_seq_ondisk = last_seq;
|
||||
if (seq >= j->pin.front)
|
||||
journal_seq_pin(j, seq)->devs = devs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user