+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_JOURNAL_IO_H
#define _BCACHEFS_JOURNAL_IO_H
*/
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;
};
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 */