1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_LRU_FORMAT_H
3 #define _BCACHEFS_LRU_FORMAT_H
4 
5 struct bch_lru {
6 	struct bch_val		v;
7 	__le64			idx;
8 } __packed __aligned(8);
9 
10 #define BCH_LRU_TYPES()		\
11 	x(read)			\
12 	x(fragmentation)
13 
14 enum bch_lru_type {
15 #define x(n) BCH_LRU_##n,
16 	BCH_LRU_TYPES()
17 #undef x
18 };
19 
20 #define BCH_LRU_FRAGMENTATION_START	((1U << 16) - 1)
21 
22 #define LRU_TIME_BITS			48
23 #define LRU_TIME_MAX			((1ULL << LRU_TIME_BITS) - 1)
24 
25 #endif /* _BCACHEFS_LRU_FORMAT_H */
26