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:
@@ -98,16 +98,16 @@ static inline void _ocf_write_wt_submit(struct ocf_request *req)
|
||||
static void _ocf_write_wt_update_bits(struct ocf_request *req)
|
||||
{
|
||||
if (ocf_engine_is_miss(req)) {
|
||||
ocf_req_hash_lock_rd(req);
|
||||
ocf_hb_req_prot_lock_rd(req);
|
||||
|
||||
/* Update valid status bits */
|
||||
ocf_set_valid_map_info(req);
|
||||
|
||||
ocf_req_hash_unlock_rd(req);
|
||||
ocf_hb_req_prot_unlock_rd(req);
|
||||
}
|
||||
|
||||
if (req->info.dirty_any) {
|
||||
ocf_req_hash_lock_wr(req);
|
||||
ocf_hb_req_prot_lock_wr(req);
|
||||
|
||||
/* Writes goes to SDD and HDD, need to update status bits from
|
||||
* dirty to clean
|
||||
@@ -115,20 +115,20 @@ static void _ocf_write_wt_update_bits(struct ocf_request *req)
|
||||
|
||||
ocf_set_clean_map_info(req);
|
||||
|
||||
ocf_req_hash_unlock_wr(req);
|
||||
ocf_hb_req_prot_unlock_wr(req);
|
||||
}
|
||||
|
||||
if (ocf_engine_needs_repart(req)) {
|
||||
OCF_DEBUG_RQ(req, "Re-Part");
|
||||
|
||||
ocf_req_hash_lock_wr(req);
|
||||
ocf_hb_req_prot_lock_wr(req);
|
||||
|
||||
/* Probably some cache lines are assigned into wrong
|
||||
* partition. Need to move it to new one
|
||||
*/
|
||||
ocf_part_move(req);
|
||||
|
||||
ocf_req_hash_unlock_wr(req);
|
||||
ocf_hb_req_prot_unlock_wr(req);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user