Fix error accounting in forward_io
Resetting cache_error/core_error in ocf_req_forward_* functions may lead to overwriting already reported error if the forward is being done in the loop. To avoid this potential problem, introduce set of forward init functions intended to be called before the entire forward operation, which resets the error code and sets a forward callback. Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
@@ -62,7 +62,7 @@ static int ocf_read_wo_cache_do(struct ocf_request *req)
|
||||
uint64_t offset = 0;
|
||||
uint64_t increment = 0;
|
||||
|
||||
req->cache_forward_end = ocf_read_wo_cache_complete;
|
||||
ocf_req_forward_cache_init(req, ocf_read_wo_cache_complete);
|
||||
|
||||
ocf_req_forward_cache_get(req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user