From e0ef8c1b8daf661a2224d2482dcc095b21dba642 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Wed, 11 Oct 2023 08:02:56 +0200 Subject: [PATCH] New error codes Signed-off-by: Michal Mielewczyk --- casadm/extended_err_msg.c | 10 ++++++++++ modules/include/cas_ioctl_codes.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/casadm/extended_err_msg.c b/casadm/extended_err_msg.c index 431bfa0..264e36e 100644 --- a/casadm/extended_err_msg.c +++ b/casadm/extended_err_msg.c @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2022 Intel Corporation +* Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -178,6 +179,10 @@ struct { OCF_ERR_CACHE_LINE_SIZE_MISMATCH, "Cache line size mismatch" }, + { + OCF_ERR_CACHE_DETACHED, + "The operation is not permited while the cache is detached" + }, { OCF_ERR_CACHE_STANDBY, "The operation is not permited while the cache is in the standby mode" @@ -239,6 +244,11 @@ struct { "Device contains partitions.\nIf you want to continue, " "please use --force option.\nWarning: all data will be lost!" }, + { + KCAS_ERR_DEVICE_PROPERTIES_MISMATCH, + "The new device's properties doesn't match the original cache device's" + " properties" + }, { KCAS_ERR_A_PART, "Formatting of partition is unsupported." diff --git a/modules/include/cas_ioctl_codes.h b/modules/include/cas_ioctl_codes.h index 78912aa..a9cd4a3 100644 --- a/modules/include/cas_ioctl_codes.h +++ b/modules/include/cas_ioctl_codes.h @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2022 Intel Corporation +* Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -545,6 +546,11 @@ enum kcas_error { /** Device contains partitions */ KCAS_ERR_CONTAINS_PART, + /** The new device's properties doesn't match the original cache's + * properties + */ + KCAS_ERR_DEVICE_PROPERTIES_MISMATCH, + /** Given device is a partition */ KCAS_ERR_A_PART,