Move resume callback to async lock function params (refactoring)

This is a step towards common async lock interface in OCF.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2019-09-10 15:23:49 -04:00
parent 3ced3fb9db
commit f34cacf150
13 changed files with 84 additions and 98 deletions

View File

@@ -197,7 +197,6 @@ int ocf_read_wo_do(struct ocf_request *req)
static const struct ocf_io_if _io_if_wo_resume = {
.read = ocf_read_wo_do,
.write = ocf_read_wo_do,
.resume = ocf_engine_on_resume,
};
int ocf_read_wo(struct ocf_request *req)
@@ -224,7 +223,7 @@ int ocf_read_wo(struct ocf_request *req)
/* There are mapped cache lines,
* lock request for READ access
*/
lock = ocf_req_trylock_rd(req);
lock = ocf_req_async_lock_rd(req, ocf_engine_on_resume);
}
OCF_METADATA_UNLOCK_RD(); /*- END Metadata RD access -----------------*/