mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 01:21:28 +00:00
f04158290d
Since btree_ptr_v2, we no longer require the journal seq blacklist table for skipping blacklisted bsets (btree node entries); the pointer to a given node indicates how much data is present. Therefore there's no longer any need for journal seq blacklist gc to walk the btree - we can prune entries older than journal last_seq. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
23 lines
705 B
C
23 lines
705 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;
|
|
|
|
bool bch2_blacklist_entries_gc(struct bch_fs *);
|
|
|
|
#endif /* _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H */
|