File: journal_seq_blacklist.h

package info (click to toggle)
linux 6.17.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,734,892 kB
  • sloc: ansic: 26,684,085; asm: 271,195; sh: 147,401; python: 75,980; makefile: 57,306; perl: 36,943; xml: 19,562; cpp: 5,899; yacc: 4,909; lex: 2,943; awk: 1,556; sed: 29; ruby: 25
file content (23 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* 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);
u64 bch2_journal_last_blacklisted_seq(struct bch_fs *);
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 */