Skip to content

Commit

Permalink
Don't modify req->error for IOs outside io engines
Browse files Browse the repository at this point in the history
`req->error` should be modified by the request's owner only; hence, if
the request has been allocated to handle IO (i.e. it's not an internal OCF
request) only engines can change it

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
  • Loading branch information
mmichal10 committed Oct 1, 2024
1 parent f59f6e4 commit 237f6c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/metadata/metadata_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ static void _raw_ram_flush_do_asynch_io_complete(ocf_cache_t cache,
OCF_DEBUG_MSG(cache, "Asynchronous flushing complete");

/* Call metadata flush completed call back */
ctx->req->error |= ctx->error;
ctx->complete(ctx->req, ctx->error);

env_free(ctx);
Expand Down
2 changes: 0 additions & 2 deletions src/ocf_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@ void ocf_forward_end(ocf_forward_token_t token, int error)
{
struct ocf_request *req = ocf_req_forward_token_to_req(token);

req->error |= error;

if (token & 1) {
req->cache_error = req->cache_error ?: error;
ocf_req_forward_cache_put(req);
Expand Down

0 comments on commit 237f6c7

Please sign in to comment.