Use API instead of raw variables to update error stats.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
@@ -48,7 +48,7 @@ static void _ocf_write_wt_cache_complete(struct ocf_request *req, int error)
|
||||
{
|
||||
if (error) {
|
||||
req->error = req->error ?: error;
|
||||
env_atomic_inc(&req->core->counters->cache_errors.write);
|
||||
ocf_core_stats_cache_error_update(req->core, OCF_WRITE);
|
||||
|
||||
if (req->error)
|
||||
inc_fallback_pt_error_counter(req->cache);
|
||||
@@ -62,7 +62,7 @@ static void _ocf_write_wt_core_complete(struct ocf_request *req, int error)
|
||||
if (error) {
|
||||
req->error = error;
|
||||
req->info.core_error = 1;
|
||||
env_atomic_inc(&req->core->counters->core_errors.write);
|
||||
ocf_core_stats_core_error_update(req->core, OCF_WRITE);
|
||||
}
|
||||
|
||||
_ocf_write_wt_req_complete(req);
|
||||
|
Reference in New Issue
Block a user