Commit | Line | Data |
---|---|---|
1c6fdbd8 KO |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H | |
3 | #define _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H | |
4 | ||
9f115ce9 KO |
5 | static inline unsigned |
6 | blacklist_nr_entries(struct bch_sb_field_journal_seq_blacklist *bl) | |
7 | { | |
8 | return bl | |
9 | ? ((vstruct_end(&bl->field) - (void *) &bl->start[0]) / | |
10 | sizeof(struct journal_seq_blacklist_entry)) | |
11 | : 0; | |
12 | } | |
13 | ||
1dd7f9d9 KO |
14 | bool bch2_journal_seq_is_blacklisted(struct bch_fs *, u64, bool); |
15 | int bch2_journal_seq_blacklist_add(struct bch_fs *c, u64, u64); | |
16 | int bch2_blacklist_table_initialize(struct bch_fs *); | |
17 | ||
18 | extern const struct bch_sb_field_ops bch_sb_field_ops_journal_seq_blacklist; | |
19 | ||
20 | void bch2_blacklist_entries_gc(struct work_struct *); | |
1c6fdbd8 KO |
21 | |
22 | #endif /* _BCACHEFS_JOURNAL_SEQ_BLACKLIST_H */ |