Lines Matching defs:key

12  * Mbcache is a simple key-value store. Keys need not be unique, however
13 * key-value pairs are expected to be unique (we use this fact in
18 * They use hash of data as a key and provide a value that may represent a
23 * We provide functions for creation and removal of entries, search by key,
24 * and a special "delete entry with given key-value pair" operation. Fixed
25 * size hash table is used for fast key lookups.
51 u32 key)
53 return &cache->c_hash[hash_32(key, cache->c_bucket_bits)];
66 * @key - key of the entry
70 * Creates entry in @cache with key @key and value @value. The function returns
71 * -EBUSY if entry with the same key and value already exists in cache.
74 int mb_cache_entry_create(struct mb_cache *cache, gfp_t mask, u32 key,
101 entry->e_key = key;
106 head = mb_cache_entry_head(cache, key);
109 if (dup->e_key == key && dup->e_value == value) {
154 u32 key)
160 head = mb_cache_entry_head(cache, key);
169 if (entry->e_key == key &&
185 * mb_cache_entry_find_first - find the first reusable entry with the given key
187 * @key: key to look for
189 * Search in @cache for a reusable entry with key @key. Grabs reference to the
193 u32 key)
195 return __entry_find(cache, NULL, key);
200 * mb_cache_entry_find_next - find next reusable entry with the same key
204 * Finds next reusable entry in the hash chain which has the same key as @entry.
217 * mb_cache_entry_get - get a cache entry by value (and key)
219 * @key - key
222 struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *cache, u32 key,
229 head = mb_cache_entry_head(cache, key);
232 if (entry->e_key == key && entry->e_value == value &&
245 * @key - key
248 * Remove entry from cache @cache with key @key and value @value. The removal
255 u32 key, u64 value)
259 entry = mb_cache_entry_get(cache, key, value);