Skip to content

Commit

Permalink
Remove ocf_queue_get_cache()
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
  • Loading branch information
robertbaldyga committed Sep 9, 2024
1 parent f9af5c2 commit 08e9f1a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions modules/cas_cache/layer_cache_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/cas_cache/threads.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion modules/cas_cache/threads.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand All @@ -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);

Expand Down

0 comments on commit 08e9f1a

Please sign in to comment.