2017-03-16 23:18:50 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H
|
|
|
|
#define _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H
|
|
|
|
|
2020-08-04 20:10:08 -07:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-04-04 18:53:12 -07:00
|
|
|
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;
|
|
|
|
|
2024-04-20 19:19:48 -07:00
|
|
|
bool bch2_blacklist_entries_gc(struct bch_fs *);
|
2022-01-04 17:41:23 -07:00
|
|
|
|
2017-03-16 23:18:50 -07:00
|
|
|
#endif /* _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H */
|