Merge pull request #838 from robertbaldyga/fix-wi-double-completion
Fix double completion in engine_wi
This commit is contained in:
commit
34778d4529
@ -36,8 +36,6 @@ static int _ocf_invalidate_do(struct ocf_request *req)
|
||||
{
|
||||
struct ocf_cache *cache = req->cache;
|
||||
|
||||
ENV_BUG_ON(env_atomic_read(&req->req_remaining));
|
||||
|
||||
ocf_hb_req_prot_lock_wr(req);
|
||||
ocf_purge_map_info(req);
|
||||
ocf_hb_req_prot_unlock_wr(req);
|
||||
|
@ -77,8 +77,6 @@ static int ocf_write_wi_update_and_flush_metadata(struct ocf_request *req)
|
||||
|
||||
/* There are mapped cache line, need to remove them */
|
||||
|
||||
env_atomic_set(&req->req_remaining, 1); /* One core IO */
|
||||
|
||||
ocf_hb_req_prot_lock_wr(req); /*- Metadata WR access ---------------*/
|
||||
|
||||
/* Remove mapped cache lines from metadata */
|
||||
@ -90,6 +88,8 @@ static int ocf_write_wi_update_and_flush_metadata(struct ocf_request *req)
|
||||
/* Request was dirty and need to flush metadata */
|
||||
ocf_metadata_flush_do_asynch(cache, req,
|
||||
_ocf_write_wi_io_flush_metadata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ocf_write_wi_io_flush_metadata(req, 0);
|
||||
|
@ -103,7 +103,6 @@ static int _ocf_zero_do(struct ocf_request *req)
|
||||
ocf_zero_map_info(req);
|
||||
|
||||
/* Discard marked cache lines */
|
||||
env_atomic_set(&req->req_remaining, 1);
|
||||
if (req->info.flush_metadata) {
|
||||
/* Request was dirty and need to flush metadata */
|
||||
ocf_metadata_flush_do_asynch(cache, req,
|
||||
|
@ -1192,8 +1192,6 @@ void ocf_metadata_flush_do_asynch(struct ocf_cache *cache,
|
||||
* line persistent in case of recovery
|
||||
*/
|
||||
|
||||
env_atomic_inc(&req->req_remaining); /* Core device IO */
|
||||
|
||||
result |= ocf_metadata_raw_flush_do_asynch(cache, req,
|
||||
&(ctrl->raw_desc[metadata_segment_collision]),
|
||||
complete);
|
||||
|
Loading…
Reference in New Issue
Block a user