Switch from global metadata locks to hash-bucket locks in engines
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -201,7 +201,6 @@ static const struct ocf_io_if _io_if_wo_resume = {
|
||||
|
||||
int ocf_read_wo(struct ocf_request *req)
|
||||
{
|
||||
ocf_cache_t cache = req->cache;
|
||||
int lock = OCF_LOCK_ACQUIRED;
|
||||
|
||||
OCF_DEBUG_TRACE(req->cache);
|
||||
@@ -214,7 +213,8 @@ int ocf_read_wo(struct ocf_request *req)
|
||||
/* Set resume call backs */
|
||||
req->io_if = &_io_if_wo_resume;
|
||||
|
||||
OCF_METADATA_LOCK_RD(); /*- Metadata RD access -----------------------*/
|
||||
ocf_req_hash(req);
|
||||
ocf_req_hash_lock_rd(req); /*- Metadata RD access -----------------------*/
|
||||
|
||||
/* Traverse request to check if there are mapped cache lines */
|
||||
ocf_engine_traverse(req);
|
||||
@@ -226,7 +226,7 @@ int ocf_read_wo(struct ocf_request *req)
|
||||
lock = ocf_req_async_lock_rd(req, ocf_engine_on_resume);
|
||||
}
|
||||
|
||||
OCF_METADATA_UNLOCK_RD(); /*- END Metadata RD access -----------------*/
|
||||
ocf_req_hash_unlock_rd(req); /*- END Metadata RD access -----------------*/
|
||||
|
||||
if (lock >= 0) {
|
||||
if (lock != OCF_LOCK_ACQUIRED) {
|
||||
|
||||
Reference in New Issue
Block a user