Avoid adding mngt_queue to io_queues list

Previously every created queue was added to io_queues list, which
made mngt_queue being used in ocf_parallelize. Change mngt_queue creation
API so that mngt_queue is not added to the list and doesn't have
unnecessary functionalities initialized.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Robert Baldyga
2023-05-17 19:30:36 +02:00
committed by Michal Mielewczyk
parent 1d903f4038
commit 8db93260ae
8 changed files with 101 additions and 61 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -325,17 +326,6 @@ static inline void ocf_mngt_cache_config_set_default(
int ocf_mngt_cache_start(ocf_ctx_t ctx, ocf_cache_t *cache,
struct ocf_mngt_cache_config *cfg, void *priv);
/**
* @brief Set queue to be used during management operations
*
* @param[in] cache Cache object
* @param[in] queue Queue object
*
* @retval 0 Success
* @retval Non-zero Error occurred
*/
int ocf_mngt_cache_set_mngt_queue(ocf_cache_t cache, ocf_queue_t queue);
/**
* @brief Completion callback of cache stop operation
*

View File

@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -59,6 +60,18 @@ struct ocf_queue_ops {
int ocf_queue_create(ocf_cache_t cache, ocf_queue_t *queue,
const struct ocf_queue_ops *ops);
/**
* @brief Allocate mngt queue and assign it to cache
*
* @param[in] cache Handle to cache instance
* @param[out] queue Handle to created queue
* @param[in] ops Queue operations
*
* @return Zero on success, otherwise error code
*/
int ocf_queue_create_mngt(ocf_cache_t cache, ocf_queue_t *queue,
const struct ocf_queue_ops *ops);
/**
* @brief Increase reference counter in queue
*