2022-03-14 02:21:13 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_LRU_H
|
|
|
|
#define _BCACHEFS_LRU_H
|
|
|
|
|
2022-04-06 21:13:15 +03:00
|
|
|
int bch2_lru_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *);
|
2022-03-14 02:21:13 +03:00
|
|
|
void bch2_lru_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
|
|
|
|
|
2022-10-24 00:39:22 +03:00
|
|
|
#define bch2_bkey_ops_lru ((struct bkey_ops) { \
|
2022-03-14 02:21:13 +03:00
|
|
|
.key_invalid = bch2_lru_invalid, \
|
|
|
|
.val_to_text = bch2_lru_to_text, \
|
2022-10-24 00:39:22 +03:00
|
|
|
})
|
2022-03-14 02:21:13 +03:00
|
|
|
|
2022-04-12 05:40:16 +03:00
|
|
|
int bch2_lru_delete(struct btree_trans *, u64, u64, u64, struct bkey_s_c);
|
2022-04-11 03:02:24 +03:00
|
|
|
int bch2_lru_set(struct btree_trans *, u64, u64, u64 *);
|
2022-04-12 05:40:16 +03:00
|
|
|
int bch2_lru_change(struct btree_trans *, u64, u64, u64, u64 *, struct bkey_s_c);
|
2022-03-14 02:21:13 +03:00
|
|
|
|
2022-05-19 22:59:37 +03:00
|
|
|
int bch2_check_lrus(struct bch_fs *);
|
2022-03-14 02:21:13 +03:00
|
|
|
|
|
|
|
#endif /* _BCACHEFS_LRU_H */
|