]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/lru.h
0a01836c07c1d06e29229d8b052f2d5197a4c456
[bcachefs-tools-debian] / libbcachefs / lru.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_LRU_H
3 #define _BCACHEFS_LRU_H
4
5 int bch2_lru_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *);
6 void bch2_lru_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
7
8 #define bch2_bkey_ops_lru (struct bkey_ops) {   \
9         .key_invalid    = bch2_lru_invalid,     \
10         .val_to_text    = bch2_lru_to_text,     \
11 }
12
13 int bch2_lru_delete(struct btree_trans *, u64, u64, u64);
14 int bch2_lru_set(struct btree_trans *, u64, u64, u64 *);
15 int bch2_lru_change(struct btree_trans *, u64, u64, u64, u64 *);
16
17 int bch2_check_lrus(struct bch_fs *, bool);
18
19 #endif /* _BCACHEFS_LRU_H */