*
* hash_update function calls hash_update_fn callback with hash_update_fn_arg right before the update
* and based on callback's return value, it either keeps the old data or updates with new data.
*/
int hash_update(struct hash_table *t,
const void *key, uint32_t key_len,
void **data, size_t *data_len,
hash_update_fn_t hash_update_fn, void *hash_update_fn_arg);
We need to add check that hash_update_fn doesn't add or remove a record with the same key as the hash_update is currently processing as that would corrupt the hash.