Merge pull request #664 from robertbaldyga/improve-bf

Extend BF queue protection to cache device queue
This commit is contained in:
Robert Baldyga 2022-03-04 18:50:43 +01:00 committed by GitHub
commit 1cce6bf24b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,8 @@ static void _ocf_backfill_complete(struct ocf_request *req, int error)
if (env_atomic_dec_return(&req->req_remaining))
return;
backfill_queue_dec_unblock(req->cache);
/* We must free the pages we have allocated */
ctx_data_secure_erase(cache->owner, req->data);
ctx_data_munlock(cache->owner, req->data);
@ -75,8 +77,6 @@ static int _ocf_backfill_do(struct ocf_request *req)
{
unsigned int reqs_to_issue;
backfill_queue_dec_unblock(req->cache);
reqs_to_issue = ocf_engine_io_count(req);
/* There will be #reqs_to_issue completions */