Merge pull request #398 from Open-CAS/proper-core-status

Fix logging core state on cache load
This commit is contained in:
Robert Baldyga 2020-09-04 19:56:16 +02:00 committed by GitHub
commit 7c29110e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2033,7 +2033,10 @@ static void _ocf_mngt_cache_unplug(ocf_cache_t cache, bool stop,
static int _ocf_mngt_cache_load_core_log(ocf_core_t core, void *cntx) static int _ocf_mngt_cache_load_core_log(ocf_core_t core, void *cntx)
{ {
ocf_core_log(core, log_info, "Successfully added\n"); if (ocf_core_state_active == ocf_core_get_state(core))
ocf_core_log(core, log_info, "Successfully added\n");
else
ocf_core_log(core, log_warn, "Failed to initialize\n");
return 0; return 0;
} }