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:
Adam Rutkowski
2019-07-31 16:31:28 -04:00
parent b39bcf86d4
commit 3a70d68d38
12 changed files with 124 additions and 129 deletions

View File

@@ -538,15 +538,14 @@ void inc_fallback_pt_error_counter(ocf_cache_t cache)
static int _ocf_engine_refresh(struct ocf_request *req)
{
struct ocf_cache *cache = req->cache;
int result;
OCF_METADATA_LOCK_RD();
/* Check under metadata RD lock */
ocf_req_hash_lock_rd(req);
result = ocf_engine_check(req);
OCF_METADATA_UNLOCK_RD();
ocf_req_hash_unlock_rd(req);
if (result == 0) {