Fix old metadata detection.

Due the changes in ocf error codes adapter misinterpreted information about no
preexisting metadata.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2019-06-13 07:49:34 -04:00
parent a9eb0ee705
commit 0cb219d178

View File

@ -384,7 +384,7 @@ static void cache_mngt_metadata_probe_end(void *priv, int error,
*context->result = error; *context->result = error;
if (error == -ENODATA || error == -EBADF) { if (error == -OCF_ERR_NO_METADATA || error == -OCF_ERR_METADATA_VER) {
cmd_info->is_cache_device = false; cmd_info->is_cache_device = false;
*context->result = 0; *context->result = 0;
} else if (error == 0) { } else if (error == 0) {