X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libbcachefs%2Fjournal_io.h;h=f34281a28f12bc64f06dc62383c16af1f3389129;hb=cb84ad03a5fa812605a887d161989bdaa81ed429;hp=2c396e3fc4f65300230120842d501649cdea741f;hpb=35ab35989718ebce0419b911a7267a1f1563d61e;p=bcachefs-tools-debian diff --git a/libbcachefs/journal_io.h b/libbcachefs/journal_io.h index 2c396e3..f34281a 100644 --- a/libbcachefs/journal_io.h +++ b/libbcachefs/journal_io.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _BCACHEFS_JOURNAL_IO_H #define _BCACHEFS_JOURNAL_IO_H @@ -7,7 +8,12 @@ */ struct journal_replay { struct list_head list; - struct bch_devs_list devs; + struct bch_extent_ptr ptrs[BCH_REPLICAS_MAX]; + unsigned nr_ptrs; + + /* checksum error, but we may want to try using it anyways: */ + bool bad; + bool ignore; /* must be last: */ struct jset j; }; @@ -34,12 +40,11 @@ static inline struct jset_entry *__jset_entry_type_next(struct jset *jset, for_each_jset_entry_type(entry, jset, BCH_JSET_ENTRY_btree_keys) \ vstruct_for_each_safe(entry, k, _n) -int bch2_journal_set_seq(struct bch_fs *c, u64, u64); -int bch2_journal_read(struct bch_fs *, struct list_head *); -void bch2_journal_entries_free(struct list_head *); -int bch2_journal_replay(struct bch_fs *, struct list_head *); +int bch2_journal_entry_validate(struct bch_fs *, const char *, struct jset_entry *, + unsigned, int, int); + +int bch2_journal_read(struct bch_fs *, struct list_head *, u64 *, u64 *); -int bch2_journal_space_available(struct journal *); void bch2_journal_write(struct closure *); #endif /* _BCACHEFS_JOURNAL_IO_H */