04f0f77df2
Since metadata version bcachefs_metadata_version_btree_ptr_sectors_written, we haven't needed the journal seq blacklist mechanism for ignoring blacklisted btree node writes - we now only need it for ignoring journal entries that were written after the newest flush journal entry, and then we only need to keep those blacklist entries around until journal replay is finished. That means we can delete the code for scanning btree nodes to GC journal_seq_blacklist entries. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
21 lines
655 B
C
21 lines
655 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H
|
|
#define _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H
|
|
|
|
static inline unsigned
|
|
blacklist_nr_entries(struct bch_sb_field_journal_seq_blacklist *bl)
|
|
{
|
|
return bl
|
|
? ((vstruct_end(&bl->field) - (void *) &bl->start[0]) /
|
|
sizeof(struct journal_seq_blacklist_entry))
|
|
: 0;
|
|
}
|
|
|
|
bool bch2_journal_seq_is_blacklisted(struct bch_fs *, u64, bool);
|
|
int bch2_journal_seq_blacklist_add(struct bch_fs *c, u64, u64);
|
|
int bch2_blacklist_table_initialize(struct bch_fs *);
|
|
|
|
extern const struct bch_sb_field_ops bch_sb_field_ops_journal_seq_blacklist;
|
|
|
|
#endif /* _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H */
|