mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
d326ab2f5d
This implements new persistent LRUs, to be used for buckets containing cached data, as well as stripes ordered by time when a block became empty. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
15 lines
453 B
C
15 lines
453 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _BCACHEFS_LRU_H
|
|
#define _BCACHEFS_LRU_H
|
|
|
|
const char *bch2_lru_invalid(const struct bch_fs *, struct bkey_s_c);
|
|
void bch2_lru_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
|
|
|
|
#define bch2_bkey_ops_lru (struct bkey_ops) { \
|
|
.key_invalid = bch2_lru_invalid, \
|
|
.val_to_text = bch2_lru_to_text, \
|
|
}
|
|
|
|
int bch2_lru_change(struct btree_trans *, u64, u64, u64, u64 *);
|
|
|
|
#endif /* _BCACHEFS_LRU_H */
|