Merge pull request #793 from robertbaldyga/kernel-6.8
Minor fixes to clean compile with newer Linux kernels
This commit is contained in:
commit
7c8ac29ab9
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -111,23 +112,6 @@ void ocf_req_unlock_rd(struct ocf_alock *c,
|
||||
void ocf_req_unlock(struct ocf_alock *c,
|
||||
struct ocf_request *req);
|
||||
|
||||
/**
|
||||
* @Check if cache line is used.
|
||||
*
|
||||
* Cache line is used when:
|
||||
* 1. It is locked for write or read access
|
||||
* or
|
||||
* 2. There is set locked bit in metadata
|
||||
*
|
||||
* @param cache - OCF cache instance
|
||||
* @param line - Cache line to be unlocked
|
||||
*
|
||||
* @retval true - cache line is used
|
||||
* @retval false - cache line is not used
|
||||
*/
|
||||
bool ocf_cache_line_is_used(struct ocf_alock *c,
|
||||
ocf_cache_line_t line);
|
||||
|
||||
/**
|
||||
* @brief Check if for specified cache line there are waiters
|
||||
* on the waiting list
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "ocf_concurrency.h"
|
||||
#include "ocf_pio_concurrency.h"
|
||||
#include "../metadata/metadata_internal.h"
|
||||
#include "../metadata/metadata_io.h"
|
||||
#include "../ocf_priv.h"
|
||||
|
Binary file not shown.
@ -136,7 +136,7 @@ static void _ocf_discard_step_complete(struct ocf_request *req, int error)
|
||||
_ocf_discard_finish_step(req);
|
||||
}
|
||||
|
||||
int _ocf_discard_step_do(struct ocf_request *req)
|
||||
static int _ocf_discard_step_do(struct ocf_request *req)
|
||||
{
|
||||
struct ocf_cache *cache = req->cache;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -16,7 +17,7 @@
|
||||
#define OCF_ENGINE_DEBUG_IO_NAME "wi"
|
||||
#include "engine_debug.h"
|
||||
|
||||
int _ocf_write_wi_next_pass(struct ocf_request *req)
|
||||
static int _ocf_write_wi_next_pass(struct ocf_request *req)
|
||||
{
|
||||
ocf_req_unlock_wr(ocf_cache_line_concurrency(req->cache), req);
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
/*
|
||||
* Copyright(c) 2019-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include "ocf/ocf.h"
|
||||
#include "engine_wo.h"
|
||||
#include "../ocf_cache_priv.h"
|
||||
#include "cache_engine.h"
|
||||
#include "engine_common.h"
|
||||
@ -172,7 +174,7 @@ static void _ocf_read_wo_core_complete(struct ocf_request *req, int error)
|
||||
ocf_engine_push_req_front(req, true);
|
||||
}
|
||||
|
||||
int ocf_read_wo_do(struct ocf_request *req)
|
||||
static int ocf_read_wo_do(struct ocf_request *req)
|
||||
{
|
||||
ocf_req_get(req);
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
/*
|
||||
* Copyright(c) 2019-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef ENGINE_WO_H_
|
||||
#define ENGINE_WO_H_
|
||||
|
||||
#include "engine_common.h"
|
||||
|
||||
int ocf_read_wo(struct ocf_request *req);
|
||||
|
||||
#endif /* ENGINE_WO_H_ */
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#include "metadata.h"
|
||||
@ -97,7 +98,7 @@ static void metadata_io_read_i_atomic_step_end(struct ocf_io *io, int error)
|
||||
metadata_io_read_i_atomic_complete(context, 0);
|
||||
}
|
||||
|
||||
int metadata_io_read_i_atomic_step(struct ocf_request *req)
|
||||
static int metadata_io_read_i_atomic_step(struct ocf_request *req)
|
||||
{
|
||||
struct metadata_io_read_i_atomic_context *context = req->priv;
|
||||
ocf_cache_t cache = context->cache;
|
||||
@ -257,7 +258,7 @@ static int metadata_io_do(struct ocf_request *req)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void metadata_io_req_finalize(struct metadata_io_request *m_req)
|
||||
static void metadata_io_req_finalize(struct metadata_io_request *m_req)
|
||||
{
|
||||
struct metadata_io_request_asynch *a_req = m_req->asynch;
|
||||
|
||||
@ -328,7 +329,7 @@ static void metadata_io_io_end(struct metadata_io_request *m_req, int error)
|
||||
metadata_io_req_complete(m_req);
|
||||
}
|
||||
|
||||
void metadata_io_req_end(struct metadata_io_request *m_req)
|
||||
static void metadata_io_req_end(struct metadata_io_request *m_req)
|
||||
{
|
||||
struct metadata_io_request_asynch *a_req = m_req->asynch;
|
||||
ocf_cache_t cache = m_req->cache;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -189,7 +190,7 @@ static uint32_t _raw_ram_checksum(ocf_cache_t cache,
|
||||
/*
|
||||
* RAM Implementation - Entry page number
|
||||
*/
|
||||
uint32_t _raw_ram_page(struct ocf_metadata_raw *raw, uint32_t entry)
|
||||
static uint32_t _raw_ram_page(struct ocf_metadata_raw *raw, uint32_t entry)
|
||||
{
|
||||
ENV_BUG_ON(entry >= raw->entries);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -37,7 +38,7 @@
|
||||
* Check if page is valid for specified RAW descriptor
|
||||
*/
|
||||
|
||||
uint32_t raw_dynamic_segment_size_on_ssd(struct ocf_metadata_raw *raw)
|
||||
static uint32_t raw_dynamic_segment_size_on_ssd(struct ocf_metadata_raw *raw)
|
||||
{
|
||||
const size_t alignment = 128 * KiB / PAGE_SIZE;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2020-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -16,6 +17,14 @@ struct ocf_metadata_segment
|
||||
struct ocf_metadata_segment *superblock;
|
||||
};
|
||||
|
||||
int ocf_metadata_segment_init_in_place(
|
||||
struct ocf_metadata_segment *segment,
|
||||
struct ocf_cache *cache,
|
||||
struct ocf_metadata_raw *raw,
|
||||
ocf_flush_page_synch_t lock_page_pfn,
|
||||
ocf_flush_page_synch_t unlock_page_pfn,
|
||||
struct ocf_metadata_segment *superblock);
|
||||
|
||||
int ocf_metadata_segment_init(
|
||||
struct ocf_metadata_segment **self,
|
||||
struct ocf_cache *cache,
|
||||
|
@ -1,11 +1,13 @@
|
||||
/*
|
||||
* Copyright(c) 2020-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include "metadata.h"
|
||||
#include "metadata_core.h"
|
||||
#include "metadata_internal.h"
|
||||
#include "metadata_segment.h"
|
||||
#include "metadata_segment_id.h"
|
||||
#include "metadata_superblock.h"
|
||||
#include "../ocf_priv.h"
|
||||
@ -26,14 +28,6 @@
|
||||
#define OCF_DEBUG_PARAM(cache, format, ...)
|
||||
#endif
|
||||
|
||||
int ocf_metadata_segment_init_in_place(
|
||||
struct ocf_metadata_segment *segment,
|
||||
struct ocf_cache *cache,
|
||||
struct ocf_metadata_raw *raw,
|
||||
ocf_flush_page_synch_t lock_page_pfn,
|
||||
ocf_flush_page_synch_t unlock_page_pfn,
|
||||
struct ocf_metadata_segment *superblock);
|
||||
|
||||
/**
|
||||
* @brief Super Block - Set Shutdown Status
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* Copyright(c) 2023 Huawei Technologies
|
||||
* Copyright(c) 2023-2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -767,7 +767,7 @@ static void _ocf_mngt_load_init_structures(ocf_pipeline_t pipeline,
|
||||
_ocf_mngt_init_metadata_complete, context, false);
|
||||
}
|
||||
|
||||
void _ocf_mngt_load_metadata_complete(void *priv, int error)
|
||||
static void _ocf_mngt_load_metadata_complete(void *priv, int error)
|
||||
{
|
||||
struct ocf_cache_attach_context *context = priv;
|
||||
ocf_cache_t cache = context->cache;
|
||||
@ -1372,7 +1372,7 @@ static void _ocf_mngt_attach_init_services(ocf_pipeline_t pipeline,
|
||||
_ocf_mngt_cleaning_populate_init_complete, context);
|
||||
}
|
||||
|
||||
uint64_t _ocf_mngt_calculate_ram_needed(ocf_cache_line_size_t line_size,
|
||||
static uint64_t _ocf_mngt_calculate_ram_needed(ocf_cache_line_size_t line_size,
|
||||
uint64_t volume_size)
|
||||
{
|
||||
uint64_t const_data_size;
|
||||
@ -2849,7 +2849,7 @@ _ocf_mngt_cache_standby_detach_pipeline_properties = {
|
||||
},
|
||||
};
|
||||
|
||||
void _ocf_mngt_cache_standby_detach(ocf_cache_t cache,
|
||||
static void _ocf_mngt_cache_standby_detach(ocf_cache_t cache,
|
||||
ocf_mngt_cache_standby_detach_end_t cmpl, void *priv)
|
||||
{
|
||||
struct ocf_cache_standby_detach_context *context;
|
||||
|
@ -1,9 +1,11 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include "ocf/ocf.h"
|
||||
#include "ocf_mngt_core_pool_priv.h"
|
||||
#include "ocf_mngt_common.h"
|
||||
#include "../ocf_priv.h"
|
||||
#include "../ocf_core_priv.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -460,7 +461,7 @@ finish:
|
||||
end(context);
|
||||
}
|
||||
|
||||
void _ocf_flush_container_complete(void *ctx)
|
||||
static void _ocf_flush_container_complete(void *ctx)
|
||||
{
|
||||
struct ocf_mngt_cache_flush_context *context = ctx;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -95,17 +96,6 @@ bool ocf_core_is_valid(ocf_cache_t cache, ocf_core_id_t id)
|
||||
return true;
|
||||
}
|
||||
|
||||
int ocf_core_get(ocf_cache_t cache, ocf_core_id_t id, ocf_core_t *core)
|
||||
{
|
||||
OCF_CHECK_NULL(cache);
|
||||
|
||||
if (!ocf_core_is_valid(cache, id))
|
||||
return -OCF_ERR_CORE_NOT_AVAIL;
|
||||
|
||||
*core = &cache->core[id];
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t ocf_core_get_seq_cutoff_threshold(ocf_core_t core)
|
||||
{
|
||||
return env_atomic_read(&core->conf_meta->seq_cutoff_threshold);
|
||||
@ -265,7 +255,7 @@ static int ocf_core_submit_io_fast(struct ocf_io *io, struct ocf_request *req,
|
||||
return -OCF_ERR_IO;
|
||||
}
|
||||
|
||||
void ocf_core_volume_submit_io(struct ocf_io *io)
|
||||
static void ocf_core_volume_submit_io(struct ocf_io *io)
|
||||
{
|
||||
struct ocf_request *req;
|
||||
ocf_core_t core;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2020-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -92,7 +93,7 @@ static void ocf_seq_cutoff_base_init(struct ocf_seq_cutoff *base, int nstreams)
|
||||
}
|
||||
}
|
||||
|
||||
void ocf_seq_cutoff_base_deinit(struct ocf_seq_cutoff *base)
|
||||
static void ocf_seq_cutoff_base_deinit(struct ocf_seq_cutoff *base)
|
||||
{
|
||||
env_rwlock_destroy(&base->lock);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#ifndef OCF_UTILS_ALOCK_H_
|
||||
@ -54,6 +55,23 @@ int ocf_alock_lock_rd(struct ocf_alock *alock,
|
||||
int ocf_alock_lock_wr(struct ocf_alock *alock,
|
||||
struct ocf_request *req, ocf_req_async_lock_cb cmpl);
|
||||
|
||||
/**
|
||||
* @Check if cache line is used.
|
||||
*
|
||||
* Cache line is used when:
|
||||
* 1. It is locked for write or read access
|
||||
* or
|
||||
* 2. There is set locked bit in metadata
|
||||
*
|
||||
* @param cache - OCF cache instance
|
||||
* @param line - Cache line to be unlocked
|
||||
*
|
||||
* @retval true - cache line is used
|
||||
* @retval false - cache line is not used
|
||||
*/
|
||||
bool ocf_cache_line_is_used(struct ocf_alock *c,
|
||||
ocf_cache_line_t line);
|
||||
|
||||
bool ocf_alock_waitlist_is_empty(struct ocf_alock *alock,
|
||||
ocf_cache_line_t entry);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2019-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -12,7 +13,7 @@ struct ocf_async_lock_waiter {
|
||||
ocf_async_lock_end_t cmpl;
|
||||
};
|
||||
|
||||
void _ocf_async_lock_collect_waiters(ocf_async_lock_t lock,
|
||||
static void _ocf_async_lock_collect_waiters(ocf_async_lock_t lock,
|
||||
struct list_head *waiters)
|
||||
{
|
||||
ocf_async_lock_waiter_t iter, temp;
|
||||
@ -31,7 +32,7 @@ void _ocf_async_lock_collect_waiters(ocf_async_lock_t lock,
|
||||
}
|
||||
}
|
||||
|
||||
void _ocf_async_lock_run_waiters(struct ocf_async_lock *lock,
|
||||
static void _ocf_async_lock_run_waiters(struct ocf_async_lock *lock,
|
||||
struct list_head *waiters, int status)
|
||||
{
|
||||
ocf_async_lock_waiter_t iter, temp;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2020-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -276,7 +277,7 @@ static struct ocf_rb_node *ocf_rb_tree_sibling(struct ocf_rb_node *node)
|
||||
}
|
||||
|
||||
|
||||
void ocf_rb_tree_fix_double_black(struct ocf_rb_tree *tree,
|
||||
static void ocf_rb_tree_fix_double_black(struct ocf_rb_tree *tree,
|
||||
struct ocf_rb_node *node)
|
||||
{
|
||||
struct ocf_rb_node *sibling;
|
||||
|
Loading…
Reference in New Issue
Block a user