Linux 6.13-rc4
[linux.git] / fs / bcachefs / lru_format.h
blobf372cb3b8cda06dc221fcf9cbcfff347a56eb6b1
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_LRU_FORMAT_H
3 #define _BCACHEFS_LRU_FORMAT_H
5 struct bch_lru {
6 struct bch_val v;
7 __le64 idx;
8 } __packed __aligned(8);
10 #define BCH_LRU_TYPES() \
11 x(read) \
12 x(fragmentation)
14 enum bch_lru_type {
15 #define x(n) BCH_LRU_##n,
16 BCH_LRU_TYPES()
17 #undef x
20 #define BCH_LRU_FRAGMENTATION_START ((1U << 16) - 1)
22 #define LRU_TIME_BITS 48
23 #define LRU_TIME_MAX ((1ULL << LRU_TIME_BITS) - 1)
25 #endif /* _BCACHEFS_LRU_FORMAT_H */