Merge pull request #184 from micrakow/rate_limit_log_engine_err

Use rate limited logging in case of engine error
This commit is contained in:
Michał Mielewczyk 2019-06-06 11:47:39 +02:00 committed by GitHub
commit 2f29e57b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,9 +24,12 @@ void ocf_engine_error(struct ocf_request *req,
if (stop_cache) if (stop_cache)
env_bit_clear(ocf_cache_state_running, &cache->cache_state); env_bit_clear(ocf_cache_state_running, &cache->cache_state);
if (ocf_cache_log_rl(cache)) {
ocf_core_log(req->core, log_err, ocf_core_log(req->core, log_err,
"%s sector: %" ENV_PRIu64 ", bytes: %u\n", msg, "%s sector: %" ENV_PRIu64 ", bytes: %u\n", msg,
BYTES_TO_SECTORS(req->byte_position), req->byte_length); BYTES_TO_SECTORS(req->byte_position),
req->byte_length);
}
} }
void ocf_engine_lookup_map_entry(struct ocf_cache *cache, void ocf_engine_lookup_map_entry(struct ocf_cache *cache,