Zero metadata if on-disk version differs from current
Kernel adapter now returns is_cache_device=1 and newly added metadata_compatible=0 in case of metadata detected with differing version (instead of is_cache_device = 0). This allows zero-superblock command to recognize old cache instance and clear it. casadm --script --check-cache-device still returns 'Is cache'='no' in this case, as this layer only cares about metadata in current version to be able to detect dirty datas tatus. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -314,7 +314,12 @@ struct kcas_core_pool_remove {
|
||||
|
||||
struct kcas_cache_check_device {
|
||||
char path_name[MAX_STR_LEN]; /**< path to a device */
|
||||
bool is_cache_device;
|
||||
bool is_cache_device; /* OCF metadata detected */
|
||||
|
||||
/* following bool flags are defined is_cache_device == 1 */
|
||||
bool metadata_compatible; /* OCF metadata is in current version */
|
||||
|
||||
/* following bool flags are defined iff is_metadata_compatible == 1 */
|
||||
bool clean_shutdown;
|
||||
bool cache_dirty;
|
||||
bool format_atomic;
|
||||
|
||||
Reference in New Issue
Block a user