Merge pull request #625 from robertbaldyga/metadata-probe-error-handle

Handle error in ocf_metadata_probe() complete callback properly
This commit is contained in:
Robert Baldyga 2021-01-13 18:00:52 +01:00 committed by GitHub
commit f967596b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1882,7 +1882,11 @@ static void cache_mngt_check_metadata_end(void *priv, int error,
*context->result = error;
if (error == -OCF_ERR_NO_METADATA || error == -OCF_ERR_METADATA_VER) {
if (error == -OCF_ERR_NO_METADATA) {
printk(KERN_ERR "No cache metadata found!\n");
} else if (error == -OCF_ERR_METADATA_VER) {
printk(KERN_ERR "Cache metadata version mismatch\n");
} else if (error) {
printk(KERN_ERR "Failed to load cache metadata!\n");
} else if (strncmp(status->cache_name, context->cache_name,
OCF_CACHE_NAME_SIZE)) {