Merge pull request #1088 from robertbaldyga/activate-ignore-part-check

Ignore partitions check on standby activate
This commit is contained in:
Robert Baldyga 2022-03-10 21:32:44 +01:00 committed by GitHub
commit 430d971bb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2328,7 +2328,13 @@ int cache_mngt_activate(struct ocf_mngt_cache_standby_activate_config *cfg,
if (result)
goto out_cache_put;
result = cache_mngt_check_bdev(&cfg->device, false);
/*
* We ignore partitions detected on the cache device despite we
* know at this point that activate is gonna fail. We want OCF
* to compare data on drive and in DRAM to provide more specific
* error code.
*/
result = cache_mngt_check_bdev(&cfg->device, true);
if (result)
goto out_cache_unlock;