Merge pull request #833 from mmichal10/wi-fix

Clean dirty requests in WI
This commit is contained in:
Robert Baldyga 2024-09-19 15:34:38 +02:00 committed by GitHub
commit edce2c26a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,6 +133,19 @@ static int _ocf_write_wi_core_write(struct ocf_request *req)
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);
if (req->info.dirty_any) {
ocf_hb_req_prot_lock_rd(req);
/* Need to clean, start it */
ocf_engine_clean(req);
ocf_hb_req_prot_unlock_rd(req);
/* The processing shall be resumed once the async cleaning
ends */
ocf_req_put(req);
return 0;
}
env_atomic_set(&req->req_remaining, 1); /* One core IO */ env_atomic_set(&req->req_remaining, 1); /* One core IO */
OCF_DEBUG_RQ(req, "Submit"); OCF_DEBUG_RQ(req, "Submit");