diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-03-07 19:45:57 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-04-03 12:44:10 -0400 |
commit | 61b7fb3343c8ff1415520bc21d68ac38987ffccd (patch) | |
tree | 21c363e5108cf17fcffbd2953bc6dfc4b371a88e | |
parent | 5743d6b520f924b44ef99385841e7ada2f397742 (diff) |
bcachefs: assertion to catch outstanding bug
-rw-r--r-- | fs/bcachefs/super-io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 71d97c57830f..ca3614247877 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -1019,7 +1019,10 @@ void bch2_fs_mark_clean(struct bch_fs *c, bool clean) sb_clean->flags = 0; sb_clean->read_clock = cpu_to_le16(c->bucket_clock[READ].hand); sb_clean->write_clock = cpu_to_le16(c->bucket_clock[WRITE].hand); - sb_clean->journal_seq = journal_cur_seq(&c->journal) - 1; + sb_clean->journal_seq = cpu_to_le64(journal_cur_seq(&c->journal) - 1); + + /* Trying to catch outstanding bug: */ + BUG_ON(le64_to_cpu(sb_clean->journal_seq) > S64_MAX); entry = sb_clean->start; entry = bch2_journal_super_entries_add_common(c, entry); |