Lines Matching refs:map
67 has_entry_expired(map_ctrl *map, datum *key) in has_entry_expired() argument
75 if ((map == NULL) || (map->ttl == NULL)) in has_entry_expired()
79 ttl = dbm_fetch(map->ttl, *key); in has_entry_expired()
91 MAP_EXPIRY_KEY, map->map_name); in has_entry_expired()
102 if (has_map_expired(map)) { in has_entry_expired()
104 update_map_if_required(map, FALSE); in has_entry_expired()
119 map->map_name, dbm_error(map->ttl)); in has_entry_expired()
161 has_map_expired(map_ctrl *map) in has_map_expired() argument
170 return (has_entry_expired(map, &key)); in has_map_expired()
188 update_entry_ttl(map_ctrl *map, datum *key, TTL_TYPE type) in update_entry_ttl() argument
198 ttl = get_ttl_value(map, type); in update_entry_ttl()
209 if (0 > dbm_store(map->ttl, *key, expire, DBM_REPLACE)) { in update_entry_ttl()
236 update_map_ttl(map_ctrl *map) in update_map_ttl() argument
247 if (NULL == map->ttl) { in update_map_ttl()
248 map->ttl = dbm_open(map->ttl_path, O_RDWR, 0644); in update_map_ttl()
249 if (NULL == map->ttl) in update_map_ttl()
255 ret = update_entry_ttl(map, &key, TTL_MIN); in update_map_ttl()
259 dbm_close(map->ttl); in update_map_ttl()
260 map->ttl_path = NULL; in update_map_ttl()