An entry into the hash table. More...
#include <lruhash.h>
Data Fields | |
| lock_rw_t | lock |
| rwlock for access to the contents of the entry Note that it does _not_ cover the lru_ and overflow_ ptrs. | |
| struct lruhash_entry * | overflow_next |
| next entry in overflow chain. | |
| struct lruhash_entry * | lru_next |
| next entry in lru chain. | |
| struct lruhash_entry * | lru_prev |
| prev entry in lru chain. | |
| hashvalue_t | hash |
| hash value of the key. | |
| 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_t 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 dump_rrset_lruhash(), dump_msg_lruhash(), load_ref(), worker_handle_request(), iter_lookup_parent_NS_from_cache(), iter_lookup_parent_glue_from_cache(), invalidateQueryInCache(), store_rrsets(), msg_cache_lookup(), find_add_addrs(), cache_fill_missing(), find_add_ds(), dns_cache_find_delegation(), dns_cache_lookup(), infra_delkeyfunc(), new_entry(), infra_host(), infra_set_lame(), infra_update_tcp_works(), infra_rtt_update(), infra_get_host_rto(), infra_edns_update(), infra_get_lame_rtt(), rrset_cache_touch(), rrset_update_id(), rrset_cache_update(), rrset_cache_lookup(), delkey(), newkey(), test_short_table(), testlookup(), testlookup_unlim(), infra_test(), alloc_setup_special(), alloc_clear(), alloc_get_mem(), msgreply_sizefunc(), query_entry_delete(), query_info_entrysetup(), ub_rrset_sizefunc(), reclaim_space(), lruhash_insert(), lruhash_lookup(), lruhash_remove(), bin_clear(), lruhash_traverse(), key_cache_obtain(), key_entry_sizefunc(), key_entry_delkeyfunc(), key_entry_copy(), val_neg_dlvlookup(), grab_nsec(), add_soa(), and val_find_DS().
next entry in overflow chain.
Covered by hashlock and binlock.
Referenced by test_bin_find_entry(), bin_delete(), bin_split(), bin_overflow_remove(), reclaim_space(), bin_find_entry(), lruhash_insert(), bin_clear(), lruhash_status(), and lruhash_traverse().
| struct lruhash_entry* lruhash_entry::lru_next |
next entry in lru chain.
covered by hashlock.
Referenced by dump_rrset_lruhash(), dump_msg_lruhash(), check_table(), check_lru_table(), reclaim_space(), lru_front(), and lru_remove().
| struct lruhash_entry* lruhash_entry::lru_prev |
prev entry in lru chain.
covered by hashlock.
Referenced by check_table(), check_lru_table(), reclaim_space(), lru_front(), and lru_remove().
hash value of the key.
It may not change, until entry deleted.
Referenced by move_into_cache(), iter_store_parentside_neg(), synth_dname_msg(), infra_lookup_nottl(), new_entry(), infra_host(), infra_set_lame(), infra_rtt_update(), infra_edns_update(), rrset_cache_touch(), rrset_cache_update(), rrset_cache_lookup(), rrset_update_sec_status(), rrset_check_sec_status(), rrset_cache_remove(), newkey(), test_bin_find_entry(), parse_copy_decompress_rrset(), query_info_entrysetup(), repinfo_copy_rrsets(), packed_rrset_copy_region(), packed_rrset_copy_alloc(), bin_split(), reclaim_space(), bin_find_entry(), key_cache_insert(), key_cache_search(), key_cache_remove(), and key_entry_hash().