Renaming hash bucket locking functions
1. new abbreviated previx: ocf_hb (HB stands for hash bucket) 2. clear distinction between functions requiring caller to hold metadata shared global lock ("naked") vs the ones which acquire global lock on its own ("prot" for protected) 3. clear distinction between hash bucket locking functions accepting hash bucket id ("id"), core line and lba ("cline") and entire request ("req"). Resulting naming scheme: ocf_hb_(id/cline/req)_(prot/naked)_(lock/unlock/trylock)_(rd/wr) Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -62,7 +62,7 @@ void cache_mngt_core_deinit_attached_meta(ocf_core_t core)
|
||||
|
||||
for (hash = 0; hash < num_hash;) {
|
||||
prev_cline = cache->device->collision_table_entries;
|
||||
ocf_metadata_lock_hash_wr(&cache->metadata.lock, hash);
|
||||
ocf_hb_id_prot_lock_wr(&cache->metadata.lock, hash);
|
||||
|
||||
curr_cline = ocf_metadata_get_hash(cache, hash);
|
||||
while (curr_cline != cache->device->collision_table_entries) {
|
||||
@@ -91,7 +91,7 @@ void cache_mngt_core_deinit_attached_meta(ocf_core_t core)
|
||||
else
|
||||
curr_cline = ocf_metadata_get_hash(cache, hash);
|
||||
}
|
||||
ocf_metadata_unlock_hash_wr(&cache->metadata.lock, hash);
|
||||
ocf_hb_id_prot_unlock_wr(&cache->metadata.lock, hash);
|
||||
|
||||
/* Check whether all the cachelines from the hash bucket were sparsed */
|
||||
if (curr_cline == cache->device->collision_table_entries)
|
||||
|
Reference in New Issue
Block a user