Move eviction files to new locations

src/eviction/lru.c -> src/ocf_lru.c
src/eviction/lru.h -> src/ocf_lru.h
src/eviction/lru_structs.h -> src/ocf_lru_structs.h
src/eviction/eviction.c -> src/ocf_space.c
src/eviction/eviction.h -> src/ocf_space.h

.. as well as corresponding UT files.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>

... in UT as well

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2021-06-15 20:52:44 +02:00
parent 7c0f940876
commit b1143374a8
23 changed files with 33 additions and 33 deletions

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#include "../ocf_cache_priv.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
#include "../ocf_queue_priv.h"
#ifndef __OCF_METADATA_CONCURRENCY_H__

View File

@ -25,7 +25,7 @@
#include "../utils/utils_refcnt.h"
#include "../ocf_request.h"
#include "../metadata/metadata.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
enum ocf_io_if_type {
/* Public OCF IO interfaces to be set by user */

View File

@ -15,7 +15,7 @@
#include "../utils/utils_cleaner.h"
#include "../utils/utils_user_part.h"
#include "../metadata/metadata.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
#include "../promotion/promotion.h"
#include "../concurrency/ocf_concurrency.h"

View File

@ -8,7 +8,7 @@
#include "../utils/utils_list.h"
#include "../cleaning/cleaning.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
#define OCF_NUM_PARTITIONS OCF_USER_IO_CLASS_MAX + 2

View File

@ -7,7 +7,7 @@
#define __METADATA_STRUCTS_H__
#include "metadata_common.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
#include "../cleaning/cleaning.h"
#include "../ocf_request.h"

View File

@ -21,7 +21,7 @@
#include "../utils/utils_refcnt.h"
#include "../utils/utils_async_lock.h"
#include "../concurrency/ocf_concurrency.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "../ocf_ctx_priv.h"
#include "../cleaning/cleaning.h"
#include "../promotion/ops.h"

View File

@ -11,7 +11,7 @@
#include "../metadata/metadata.h"
#include "../engine/cache_engine.h"
#include "../ocf_request.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "../ocf_logger_priv.h"
#include "../ocf_queue_priv.h"
#include "../engine/engine_common.h"

View File

@ -9,7 +9,7 @@
#include "../metadata/metadata.h"
#include "../engine/cache_engine.h"
#include "../utils/utils_user_part.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "ocf_env.h"
static uint64_t _ocf_mngt_count_user_parts_min_size(struct ocf_cache *cache)

View File

@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#include "eviction.h"
#include "lru.h"
#include "ocf_space.h"
#include "ocf_lru.h"
#include "../utils/utils_cleaner.h"
#include "../utils/utils_cache_line.h"
#include "../concurrency/ocf_concurrency.h"

View File

@ -5,8 +5,8 @@
#ifndef __EVICTION_LRU_H__
#define __EVICTION_LRU_H__
#include "eviction.h"
#include "lru_structs.h"
#include "ocf_space.h"
#include "ocf_lru_structs.h"
struct ocf_part;
struct ocf_user_part;

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#include "eviction.h"
#include "ocf_space.h"
#include "../utils/utils_user_part.h"
#include "../engine/engine_common.h"

View File

@ -7,8 +7,8 @@
#define __LAYER_EVICTION_POLICY_H__
#include "ocf/ocf.h"
#include "lru.h"
#include "lru_structs.h"
#include "ocf_lru.h"
#include "ocf_lru_structs.h"
#define OCF_PENDING_EVICTION_LIMIT 512UL

View File

@ -8,7 +8,7 @@
#include "../metadata/metadata.h"
#include "../concurrency/ocf_cache_line_concurrency.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
#include "../engine/cache_engine.h"
#include "../ocf_request.h"
#include "../ocf_def_priv.h"

View File

@ -8,7 +8,7 @@
#include "../ocf_request.h"
#include "../metadata/metadata.h"
#include "../engine/cache_engine.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "utils_user_part.h"
static struct ocf_lst_entry *ocf_user_part_lst_getter_valid(

View File

@ -16,7 +16,7 @@ MAIN_DIRECTORY_OF_UNIT_TESTS = "../tests/"
# Paths to all directories, in which tests are stored. All paths should be relative to
# MAIN_DIRECTORY_OF_UNIT_TESTS
DIRECTORIES_WITH_TESTS_LIST = ["cleaning/", "metadata/", "mngt/", "concurrency/", "engine/",
"eviction/", "utils/", "promotion/"]
"ocf_space.c/", "ocf_lru.c/", "utils/", "promotion/"]
# Paths to all directories containing files with sources. All paths should be relative to
# MAIN_DIRECTORY_OF_TESTED_PROJECT

View File

@ -33,7 +33,7 @@
#include "../utils/utils_cleaner.h"
#include "../utils/utils_user_part.h"
#include "../metadata/metadata.h"
#include "../eviction/eviction.h"
#include "../ocf_space.h"
#include "../promotion/promotion.h"
#include "../concurrency/ocf_concurrency.h"

View File

@ -36,7 +36,7 @@ ocf_mngt_cache_mode_has_lazy_write
#include "../utils/utils_cache_line.h"
#include "../utils/utils_pipeline.h"
#include "../concurrency/ocf_concurrency.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "../ocf_ctx_priv.h"
#include "../cleaning/cleaning.h"

View File

@ -30,7 +30,7 @@
#include "../utils/utils_cache_line.h"
#include "../utils/utils_pipeline.h"
#include "../concurrency/ocf_concurrency.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "../ocf_ctx_priv.h"
#include "../cleaning/cleaning.h"

View File

@ -32,7 +32,7 @@
#include "../metadata/metadata.h"
#include "../engine/cache_engine.h"
#include "../utils/utils_user_part.h"
#include "../eviction/lru.h"
#include "../ocf_lru.h"
#include "ocf_env.h"
#include "mngt/ocf_mngt_io_class.c/ocf_mngt_io_class_generated_wraps.c"

View File

@ -1,5 +1,5 @@
/*
* <tested_file_path>src/eviction/lru.c</tested_file_path>
* <tested_file_path>src/ocf_lru.c</tested_file_path>
* <tested_function>_lru_init</tested_function>
* <functions_to_leave>
* update_lru_head
@ -23,8 +23,8 @@
#include <cmocka.h>
#include "print_desc.h"
#include "eviction.h"
#include "lru.h"
#include "ocf_space.h"
#include "ocf_lru.h"
#include "ops.h"
#include "../utils/utils_cleaner.h"
#include "../utils/utils_cache_line.h"
@ -33,7 +33,7 @@
#include "../engine/engine_zero.h"
#include "../ocf_request.h"
#include "eviction/lru.c/lru_generated_wraps.c"
#include "ocf_lru.c/lru_generated_wraps.c"
#define META_COUNT 128

View File

@ -1,5 +1,5 @@
/*
* <tested_file_path>src/eviction/lru.c</tested_file_path>
* <tested_file_path>src/ocf_lru.c</tested_file_path>
* <tested_function>lru_iter_next</tested_function>
* <functions_to_leave>
* INSERT HERE LIST OF FUNCTIONS YOU WANT TO LEAVE
@ -26,8 +26,8 @@
#include <cmocka.h>
#include "print_desc.h"
#include "eviction.h"
#include "lru.h"
#include "ocf_space.h"
#include "ocf_lru.h"
#include "../utils/utils_cleaner.h"
#include "../utils/utils_cache_line.h"
#include "../concurrency/ocf_concurrency.h"
@ -35,7 +35,7 @@
#include "../engine/engine_zero.h"
#include "../ocf_request.h"
#include "eviction/lru.c/lru_iter_generated_wraps.c"
#include "ocf_lru.c/lru_iter_generated_wraps.c"
//#define DEBUG

View File

@ -1,5 +1,5 @@
/*
* <tested_file_path>src/eviction/eviction.c</tested_file_path>
* <tested_file_path>src/ocf_space.c</tested_file_path>
* <tested_function>ocf_remap_do</tested_function>
* <functions_to_leave>
ocf_evict_user_partitions
@ -17,10 +17,10 @@
#include <cmocka.h>
#include "print_desc.h"
#include "eviction.h"
#include "ocf_space.h"
#include "../utils/utils_user_part.h"
#include "eviction/eviction.c/eviction_generated_wraps.c"
#include "ocf_space.c/ocf_space_generated_wraps.c"
struct test_cache
{