Commit 60476b14 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: fix last_seq_ondisk

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 658971f2
...@@ -1207,6 +1207,7 @@ static void journal_write_done(struct closure *cl) ...@@ -1207,6 +1207,7 @@ static void journal_write_done(struct closure *cl)
struct bch_devs_list devs = struct bch_devs_list devs =
bch2_extent_devs(bkey_i_to_s_c_extent(&w->key)); bch2_extent_devs(bkey_i_to_s_c_extent(&w->key));
u64 seq = le64_to_cpu(w->data->seq); u64 seq = le64_to_cpu(w->data->seq);
u64 last_seq = le64_to_cpu(w->data->last_seq);
if (!devs.nr) { if (!devs.nr) {
bch_err(c, "unable to write journal to sufficient devices"); bch_err(c, "unable to write journal to sufficient devices");
...@@ -1219,7 +1220,7 @@ static void journal_write_done(struct closure *cl) ...@@ -1219,7 +1220,7 @@ static void journal_write_done(struct closure *cl)
bch2_time_stats_update(j->write_time, j->write_start_time); bch2_time_stats_update(j->write_time, j->write_start_time);
spin_lock(&j->lock); spin_lock(&j->lock);
j->last_seq_ondisk = seq; j->last_seq_ondisk = last_seq;
if (seq >= j->pin.front) if (seq >= j->pin.front)
journal_seq_pin(j, seq)->devs = devs; journal_seq_pin(j, seq)->devs = devs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment