Check for existing metadata when attaching cache.

Instead of overriding existing metadata silently, return appropriate error.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-07-08 09:16:12 -04:00
parent 609ff30cbc
commit 636834dae3
2 changed files with 23 additions and 2 deletions

View File

@@ -39,6 +39,9 @@ typedef enum {
/** No metadata found on device */
OCF_ERR_NO_METADATA,
/** Cache metadata found on device */
OCF_ERR_METADATA_FOUND,
/** Invalid volume type */
OCF_ERR_INVAL_VOLUME_TYPE,