Remove ocf_queue_get_cache()

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Robert Baldyga 2024-01-31 15:51:22 +01:00
parent f9af5c2e56
commit 08e9f1a323
4 changed files with 9 additions and 6 deletions

View File

@ -2000,7 +2000,8 @@ static int _cache_mngt_start_queues(ocf_cache_t cache)
if (result) if (result)
goto err; goto err;
result = cas_create_queue_thread(cache_priv->io_queues[i], i); result = cas_create_queue_thread(cache,
cache_priv->io_queues[i], i);
if (result) { if (result) {
ocf_queue_put(cache_priv->io_queues[i]); ocf_queue_put(cache_priv->io_queues[i]);
goto err; goto err;
@ -2012,7 +2013,8 @@ static int _cache_mngt_start_queues(ocf_cache_t cache)
if (result) if (result)
goto err; goto err;
result = cas_create_queue_thread(cache_priv->mngt_queue, CAS_CPUS_ALL); result = cas_create_queue_thread(cache,
cache_priv->mngt_queue, CAS_CPUS_ALL);
if (result) { if (result) {
ocf_queue_put(cache_priv->mngt_queue); ocf_queue_put(cache_priv->mngt_queue);
goto err; goto err;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -175,10 +176,9 @@ static void _cas_stop_thread(struct cas_thread_info *info)
kfree(info); kfree(info);
} }
int cas_create_queue_thread(ocf_queue_t q, int cpu) int cas_create_queue_thread(ocf_cache_t cache, ocf_queue_t q, int cpu)
{ {
struct cas_thread_info *info; struct cas_thread_info *info;
ocf_cache_t cache = ocf_queue_get_cache(q);
const char *cache_num = ocf_cache_get_name(cache) + 5; const char *cache_num = ocf_cache_get_name(cache) + 5;
int result; int result;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2021 Intel Corporation * Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -12,7 +13,7 @@
#define CAS_CPUS_ALL -1 #define CAS_CPUS_ALL -1
int cas_create_queue_thread(ocf_queue_t q, int cpu); int cas_create_queue_thread(ocf_cache_t cache, ocf_queue_t q, int cpu);
void cas_kick_queue_thread(ocf_queue_t q); void cas_kick_queue_thread(ocf_queue_t q);
void cas_stop_queue_thread(ocf_queue_t q); void cas_stop_queue_thread(ocf_queue_t q);

2
ocf

@ -1 +1 @@
Subproject commit 193410e7b2eafa439078067e24d34e8f09e5c48b Subproject commit 1fbb00de8f40bab42eb5625053a61536c49382cb