Use API instead of raw variables to update error stats.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-09-05 06:03:40 -04:00
parent 0d4f4d3294
commit b4c384eb2d
13 changed files with 18 additions and 24 deletions

View File

@@ -465,8 +465,7 @@ static void _ocf_cleaner_core_io_cmpl(struct ocf_io *io, int error)
if (error) {
map->invalid |= 1;
_ocf_cleaner_set_error(req);
env_atomic_inc(&req->cache->core[map->core_id].counters->
core_errors.write);
ocf_core_stats_core_error_update(req->core, OCF_WRITE);
}
_ocf_cleaner_core_io_end(req);
@@ -623,8 +622,7 @@ static void _ocf_cleaner_cache_io_cmpl(struct ocf_io *io, int error)
if (error) {
map->invalid |= 1;
_ocf_cleaner_set_error(req);
env_atomic_inc(&req->cache->core[map->core_id].counters->
cache_errors.read);
ocf_core_stats_cache_error_update(req->core, OCF_READ);
}
_ocf_cleaner_cache_io_end(req);