linux/fs/bcachefs/journal_io.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_JOURNAL_IO_H
#define _BCACHEFS_JOURNAL_IO_H

#include "darray.h"

void bch2_journal_pos_from_member_info_set(struct bch_fs *);
void bch2_journal_pos_from_member_info_resume(struct bch_fs *);

struct journal_ptr {};

/*
 * Only used for holding the journal entries we read in btree_journal_read()
 * during cache_registration
 */
struct journal_replay {};

static inline bool journal_replay_ignore(struct journal_replay *i)
{}

static inline struct jset_entry *__jset_entry_type_next(struct jset *jset,
					struct jset_entry *entry, unsigned type)
{}

#define for_each_jset_entry_type(entry, jset, type)

#define jset_entry_for_each_key(_e, _k)

#define for_each_jset_key(k, entry, jset)

int bch2_journal_entry_validate(struct bch_fs *, struct jset *,
				struct jset_entry *, unsigned, int,
				enum bch_validate_flags);
void bch2_journal_entry_to_text(struct printbuf *, struct bch_fs *,
				struct jset_entry *);

void bch2_journal_ptrs_to_text(struct printbuf *, struct bch_fs *,
			       struct journal_replay *);

int bch2_journal_read(struct bch_fs *, u64 *, u64 *, u64 *);

CLOSURE_CALLBACK(bch2_journal_write);

static inline struct jset_entry *jset_entry_init(struct jset_entry **end, size_t size)
{}

#endif /* _BCACHEFS_JOURNAL_IO_H */