Lines Matching defs:cache
10 * A cache entry. This is meant to be embedded in a structure of a user of
44 /* Number of entries stored in the cache. */
46 /* Maximum number of entries the cache can have. */
50 #define btrfs_lru_cache_for_each_entry_safe(cache, entry, tmp) \
51 list_for_each_entry_safe_reverse((entry), (tmp), &(cache)->lru_list, lru_list)
53 static inline unsigned int btrfs_lru_cache_size(const struct btrfs_lru_cache *cache)
55 return cache->size;
59 struct btrfs_lru_cache *cache)
61 return list_first_entry_or_null(&cache->lru_list,
65 void btrfs_lru_cache_init(struct btrfs_lru_cache *cache, unsigned int max_size);
66 struct btrfs_lru_cache_entry *btrfs_lru_cache_lookup(struct btrfs_lru_cache *cache,
68 int btrfs_lru_cache_store(struct btrfs_lru_cache *cache,
71 void btrfs_lru_cache_remove(struct btrfs_lru_cache *cache,
73 void btrfs_lru_cache_clear(struct btrfs_lru_cache *cache);