26 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2#ifndef _BCACHEFS_LRU_FORMAT_H3#define _BCACHEFS_LRU_FORMAT_H4 5struct 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 14enum bch_lru_type {15#define x(n) BCH_LRU_##n,16 BCH_LRU_TYPES()17#undef x18};19 20#define BCH_LRU_FRAGMENTATION_START ((1U << 16) - 1)21 22#define LRU_TIME_BITS 4823#define LRU_TIME_MAX ((1ULL << LRU_TIME_BITS) - 1)24 25#endif /* _BCACHEFS_LRU_FORMAT_H */26