Disable changing cache params for detached cache

Majority of management operations should be blocked for detached cache,
although adding and removing cores should be possible.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk
2023-10-05 14:55:11 +02:00
committed by Rafal Stefanowski
parent f1bfd94c98
commit 83ec255458
6 changed files with 55 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -143,6 +144,9 @@ typedef enum {
/** Invalid operation for cache in standby state. */
OCF_ERR_CACHE_STANDBY,
/** Invalid operation for cache in standby state. */
OCF_ERR_CACHE_DETACHED,
/** Size of core volume doesn't match the size stored in cache metadata */
OCF_ERR_CORE_SIZE_MISMATCH,