Merge pull request #640 from pdebski21/superblock_mismatch
added error code for superblock mismatch
This commit is contained in:
commit
c176daeec1
@ -44,6 +44,9 @@ typedef enum {
|
||||
/** Cache metadata found on device */
|
||||
OCF_ERR_METADATA_FOUND,
|
||||
|
||||
/** Metadata on the device doesn't match with metadata in DRAM */
|
||||
OCF_ERR_SUPERBLOCK_MISMATCH,
|
||||
|
||||
/** Invalid volume type */
|
||||
OCF_ERR_INVAL_VOLUME_TYPE,
|
||||
|
||||
@ -144,6 +147,7 @@ typedef enum {
|
||||
OCF_ERR_STANDBY_ATTACHED,
|
||||
|
||||
OCF_ERR_MAX = OCF_ERR_STANDBY_ATTACHED,
|
||||
|
||||
} ocf_error_t;
|
||||
|
||||
#endif /* __OCF_ERR_H__ */
|
||||
|
@ -2327,7 +2327,7 @@ static void _ocf_mngt_activate_compare_superblock_end(
|
||||
|
||||
if (diff) {
|
||||
ocf_cache_log(cache, log_err, "Superblock mismatch!\n");
|
||||
OCF_PL_FINISH_RET(context->pipeline, -OCF_ERR_INVAL);
|
||||
OCF_PL_FINISH_RET(context->pipeline, -OCF_ERR_SUPERBLOCK_MISMATCH);
|
||||
}
|
||||
|
||||
ocf_pipeline_next(context->pipeline);
|
||||
|
@ -21,6 +21,7 @@ class OcfErrorCode(IntEnum):
|
||||
OCF_ERR_METADATA_VER = auto()
|
||||
OCF_ERR_NO_METADATA = auto()
|
||||
OCF_ERR_METADATA_FOUND = auto()
|
||||
OCF_ERR_SUPERBLOCK_MISMATCH = auto()
|
||||
OCF_ERR_INVAL_VOLUME_TYPE = auto()
|
||||
OCF_ERR_UNKNOWN = auto()
|
||||
OCF_ERR_TOO_MANY_CACHES = auto()
|
||||
|
Loading…
Reference in New Issue
Block a user