From c5edc6034599f4ab17a955c6d5f63e4b8632dfb3 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 16 Sep 2019 05:59:28 -0400 Subject: [PATCH] Fix stats update in cleaner. Core is not assigned to request in cleaner, so to increase it's stats it has to be retrieved from mapping. Signed-off-by: Michal Mielewczyk --- src/utils/utils_cleaner.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/utils_cleaner.c b/src/utils/utils_cleaner.c index 46b6106..1cc90fd 100644 --- a/src/utils/utils_cleaner.c +++ b/src/utils/utils_cleaner.c @@ -616,11 +616,12 @@ static void _ocf_cleaner_cache_io_cmpl(struct ocf_io *io, int error) { struct ocf_map_info *map = io->priv1; struct ocf_request *req = io->priv2; + ocf_core_t core = ocf_cache_get_core(req->cache, map->core_id); if (error) { map->invalid |= 1; _ocf_cleaner_set_error(req); - ocf_core_stats_cache_error_update(req->core, OCF_READ); + ocf_core_stats_cache_error_update(core, OCF_READ); } _ocf_cleaner_cache_io_end(req);