An entry into the hash table. More...
#include <lruhash.h>
Data Fields | |
lock_rw_type | lock |
rwlock for access to the contents of the entry Note that it does not cover the lru_ and overflow_ ptrs. More... | |
struct lruhash_entry * | overflow_next |
next entry in overflow chain. More... | |
struct lruhash_entry * | lru_next |
next entry in lru chain. More... | |
struct lruhash_entry * | lru_prev |
prev entry in lru chain. More... | |
hashvalue_type | hash |
hash value of the key. More... | |
void * | key |
key | |
void * | data |
data | |
An entry into the hash table.
To change overflow_next you need to hold the bin lock. To change the lru items you need to hold the hashtable lock. This structure is designed as part of key struct. And key pointer helps to get the surrounding structure. Data should be allocated on its own.
lock_rw_type lruhash_entry::lock |
rwlock for access to the contents of the entry Note that it does not cover the lru_ and overflow_ ptrs.
Even with a writelock, you cannot change hash and key. You need to delete it to change hash or key.
Referenced by add_soa(), alloc_clear_special_list(), alloc_get_mem(), alloc_setup_special(), bin_clear(), delkey(), dns_cache_find_delegation(), dns_cache_lookup(), dns_cache_prefetch_adjust(), dns_cache_store(), dnsc_nonce_cache_insert(), dnsc_shared_secret_cache_insert(), dump_msg_lruhash(), dump_rrset_lruhash(), find_add_addrs(), find_closest_of_type(), grab_nsec(), infra_create_ratedata(), infra_edns_update(), infra_get_host_rto(), infra_get_lame_rtt(), infra_host(), infra_rtt_update(), infra_set_lame(), infra_update_tcp_works(), invalidateQueryInCache(), iter_lookup_parent_NS_from_cache(), key_cache_obtain(), key_entry_copy(), key_entry_sizefunc(), load_ref(), lruhash_insert(), lruhash_insert_or_retrieve(), lruhash_traverse(), mesh_serve_expired_lookup(), msg_cache_lookup(), msgreply_sizefunc(), new_entry(), query_info_entrysetup(), reclaim_space(), rrset_cache_expired_above(), rrset_cache_lookup(), rrset_cache_remove_above(), rrset_cache_touch(), rrset_cache_update(), rrset_update_id(), store_rrsets(), test_short_table(), testlookup(), testlookup_unlim(), ub_rrset_sizefunc(), and val_find_DS().
struct lruhash_entry* lruhash_entry::overflow_next |
next entry in overflow chain.
Covered by hashlock and binlock.
Referenced by bin_clear(), bin_delete(), bin_find_entry(), bin_overflow_remove(), bin_split(), lruhash_insert(), lruhash_insert_or_retrieve(), lruhash_status(), lruhash_traverse(), lruhash_update_space_used(), reclaim_space(), and test_bin_find_entry().
struct lruhash_entry* lruhash_entry::lru_next |
next entry in lru chain.
covered by hashlock.
Referenced by check_lru_table(), check_table(), dump_msg_lruhash(), dump_rrset_lruhash(), lru_demote(), and reclaim_space().
struct lruhash_entry* lruhash_entry::lru_prev |
prev entry in lru chain.
covered by hashlock.
Referenced by check_lru_table(), check_table(), lru_front(), and reclaim_space().
hashvalue_type lruhash_entry::hash |
hash value of the key.
It may not change, until entry deleted.
Referenced by auth_packed_rrset_copy_region(), az_change_dnames(), bin_find_entry(), bin_split(), dnsc_nonce_cache_insert(), dnsc_nonces_lookup(), dnsc_shared_secret_cache_insert(), dnsc_shared_secrets_lookup(), dnscrypt_server_uncurve(), infra_create_ratedata(), infra_edns_update(), infra_find_ip_ratedata(), infra_find_ratedata(), infra_host(), infra_lookup_nottl(), infra_rtt_update(), infra_set_lame(), iter_store_parentside_neg(), iter_store_parentside_rrset(), key_cache_insert(), key_cache_remove(), key_cache_search(), key_entry_hash(), lruhash_insert(), lruhash_insert_or_retrieve(), make_soa_ubrrset(), move_into_cache(), new_entry(), packed_rrset_copy_alloc(), packed_rrset_copy_region(), parse_copy_decompress_rrset(), query_info_entrysetup(), reclaim_space(), repinfo_copy_rrsets(), respip_copy_rrset(), rrset_cache_lookup(), rrset_cache_remove(), rrset_cache_touch(), rrset_cache_update(), rrset_cache_update_wildcard(), rrset_check_sec_status(), rrset_update_sec_status(), slabhash_lookup(), slabhash_remove(), slabhash_update_space_used(), and test_bin_find_entry().