Merge pull request #1509 from robertbaldyga/remove-ocf_queue_get_cache

Remove ocf_queue_get_cache()
This commit is contained in:
Robert Baldyga 2024-09-09 14:56:29 +02:00 committed by GitHub
commit 20276bd9c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)
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) {
ocf_queue_put(cache_priv->io_queues[i]);
goto err;
@ -2012,7 +2013,8 @@ static int _cache_mngt_start_queues(ocf_cache_t cache)
if (result)
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) {
ocf_queue_put(cache_priv->mngt_queue);
goto err;

View File

@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -175,10 +176,9 @@ static void _cas_stop_thread(struct cas_thread_info *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;
ocf_cache_t cache = ocf_queue_get_cache(q);
const char *cache_num = ocf_cache_get_name(cache) + 5;
int result;

View File

@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -12,7 +13,7 @@
#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_stop_queue_thread(ocf_queue_t q);

2
ocf

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