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:
@@ -28,20 +28,20 @@ static const struct ocf_io_if _io_if_wb_resume = {
|
||||
static void _ocf_write_wb_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 (!ocf_engine_is_dirty_all(req)) {
|
||||
ocf_req_hash_lock_wr(req);
|
||||
ocf_hb_req_prot_lock_wr(req);
|
||||
|
||||
/* set dirty bits, and mark if metadata flushing is required */
|
||||
ocf_set_dirty_map_info(req);
|
||||
|
||||
ocf_req_hash_unlock_wr(req);
|
||||
ocf_hb_req_prot_unlock_wr(req);
|
||||
}
|
||||
|
||||
ocf_req_set_cleaning_hot(req);
|
||||
@@ -127,14 +127,14 @@ static inline void _ocf_write_wb_submit(struct ocf_request *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);
|
||||
}
|
||||
|
||||
OCF_DEBUG_RQ(req, "Submit Data");
|
||||
|
Reference in New Issue
Block a user