Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions env/posix/ocf_env_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __OCF_ENV_LIST__
#define __OCF_ENV_LIST__
#ifndef __OCF_ENV_LIST_H__
#define __OCF_ENV_LIST_H__

#define LIST_POISON1 ((void *)0x101)
#define LIST_POISON2 ((void *)0x202)
Expand Down Expand Up @@ -165,4 +165,4 @@ static inline void list_move_tail(struct list_head *it, struct list_head *l1)
_list_entry_helper(item, (plist)->next, field_name); \
item = q, q = _list_entry_helper(q, (q)->field_name.next, field_name))

#endif // __OCF_ENV_LIST__
#endif /* __OCF_ENV_LIST_H__ */
2 changes: 1 addition & 1 deletion env/posix/ocf_env_refcnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ bool env_refcnt_zeroed(struct env_refcnt *rc);
void env_refcnt_register_zero_cb(struct env_refcnt *rc, env_refcnt_cb_t cb,
void *priv);

#endif // __OCF_ENV_REFCNT_H__
#endif /* __OCF_ENV_REFCNT_H__ */
6 changes: 3 additions & 3 deletions env/posix/utils_mpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef UTILS_MPOOL_H_
#define UTILS_MPOOL_H_
#ifndef __UTILS_MPOOL_H__
#define __UTILS_MPOOL_H__

#include <stdint.h>
#include <stdbool.h>
Expand Down Expand Up @@ -88,4 +88,4 @@ void *env_mpool_new_f(struct env_mpool *mpool, uint32_t count, int flags);
*/
bool env_mpool_del(struct env_mpool *mpool, void *items, uint32_t count);

#endif /* UTILS_MPOOL_H_ */
#endif /* __UTILS_MPOOL_H__ */
2 changes: 1 addition & 1 deletion example/simple/src/ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ void ctx_data_free(ctx_data_t *ctx_data);
int ctx_init(ocf_ctx_t *ocf_ctx);
void ctx_cleanup(ocf_ctx_t ctx);

#endif
#endif /* __CTX_H__ */
2 changes: 1 addition & 1 deletion example/simple/src/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ struct volume_data {
int offset;
};

#endif
#endif /* __DATA_H__ */
2 changes: 1 addition & 1 deletion example/simple/src/volume.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ struct myvolume {
int volume_init(ocf_ctx_t ocf_ctx);
void volume_cleanup(ocf_ctx_t ocf_ctx);

#endif
#endif /* __VOLUME_H__ */
6 changes: 3 additions & 3 deletions inc/ocf_cleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef OCF_CLEANER_H_
#define OCF_CLEANER_H_
#ifndef __OCF_CLEANER_H__
#define __OCF_CLEANER_H__

/**
* @file
Expand Down Expand Up @@ -64,4 +64,4 @@ void *ocf_cleaner_get_priv(ocf_cleaner_t c);
*/
ocf_cache_t ocf_cleaner_get_cache(ocf_cleaner_t c);

#endif
#endif /* __OCF_CLEANER_H__ */
2 changes: 1 addition & 1 deletion inc/ocf_mngt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1446,4 +1446,4 @@ int ocf_mngt_core_pool_visit(ocf_ctx_t ctx,
*/
void ocf_mngt_core_pool_remove(ocf_ctx_t ctx, ocf_volume_t volume);

#endif /* __OCF_CACHE_H__ */
#endif /* __OCF_MNGT_H__ */
6 changes: 3 additions & 3 deletions inc/ocf_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef OCF_QUEUE_H_
#define OCF_QUEUE_H_
#ifndef __OCF_QUEUE_H__
#define __OCF_QUEUE_H__

/**
* @file
Expand Down Expand Up @@ -161,4 +161,4 @@ uint32_t ocf_queue_pending_io(ocf_queue_t q);
*/
bool ocf_queue_is_mngt(ocf_queue_t queue);

#endif
#endif /* __OCF_QUEUE_H__ */
6 changes: 3 additions & 3 deletions inc/ocf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* @file
* @brief OCF types
*/
#ifndef __OCF_TYPES_H_
#define __OCF_TYPES_H_
#ifndef __OCF_TYPES_H__
#define __OCF_TYPES_H__

#include "ocf_env_headers.h"

Expand Down Expand Up @@ -110,4 +110,4 @@ typedef struct ocf_metadata_updater *ocf_metadata_updater_t;
*/
typedef struct ocf_logger *ocf_logger_t;

#endif
#endif /* __OCF_TYPES_H__ */
6 changes: 3 additions & 3 deletions src/cleaning/acp.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Copyright(c) 2026 Unvertical
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __LAYER_CLEANING_POLICY_AGGRESSIVE_H__
#ifndef __CLEANING_ACP_H__

#define __LAYER_CLEANING_POLICY_AGGRESSIVE_H__
#define __CLEANING_ACP_H__

#include "cleaning.h"

Expand Down Expand Up @@ -50,5 +50,5 @@ int cleaning_policy_acp_add_core(ocf_cache_t cache, ocf_core_id_t core_id);
void cleaning_policy_acp_remove_core(ocf_cache_t cache,
ocf_core_id_t core_id);

#endif
#endif /* __CLEANING_ACP_H__ */

15 changes: 0 additions & 15 deletions src/cleaning/acp_structs.h

This file was deleted.

7 changes: 3 additions & 4 deletions src/cleaning/alru.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
* Copyright(c) 2026 Unvertical
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __LAYER_CLEANING_POLICY_ALRU_H__
#ifndef __CLEANING_ALRU_H__

#define __LAYER_CLEANING_POLICY_ALRU_H__
#define __CLEANING_ALRU_H__

#include "cleaning.h"
#include "alru_structs.h"

void cleaning_policy_alru_setup(ocf_cache_t cache);
int cleaning_policy_alru_initialize(ocf_cache_t cache);
Expand All @@ -34,5 +33,5 @@ int cleaning_policy_alru_get_cleaning_param(ocf_cache_t cache,
uint32_t param_id, uint32_t *param_value);
void cleaning_alru_perform_cleaning(ocf_cache_t cache, ocf_cleaner_end_t cmpl);

#endif
#endif /* __CLEANING_ALRU_H__ */

15 changes: 0 additions & 15 deletions src/cleaning/alru_structs.h

This file was deleted.

9 changes: 3 additions & 6 deletions src/cleaning/cleaning.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __LAYER_CLEANING_POLICY_H__
#define __LAYER_CLEANING_POLICY_H__
#ifndef __CLEANING_H__
#define __CLEANING_H__

#include "alru_structs.h"
#include "nop_structs.h"
#include "acp_structs.h"
#include "../metadata/metadata_cleaning_policy.h"
#include "ocf_env_refcnt.h"
#include "ocf/ocf_cleaner.h"
Expand All @@ -36,4 +33,4 @@ void ocf_stop_cleaner(ocf_cache_t cache);

typedef void (*ocf_cleaning_op_end_t)(void *priv, int error);

#endif
#endif /* __CLEANING_H__ */
5 changes: 5 additions & 0 deletions src/cleaning/cleaning_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __CLEANING_OPS_H__
#define __CLEANING_OPS_H__

#include "alru.h"
#include "nop.h"
#include "acp.h"
Expand Down Expand Up @@ -337,3 +340,5 @@ static inline const char *ocf_cleaning_get_name(ocf_cleaning_t policy)

return cleaning_policy_ops[policy].name;
}

#endif /* __CLEANING_OPS_H__ */
5 changes: 5 additions & 0 deletions src/cleaning/cleaning_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __CLEANING_PRIV_H__
#define __CLEANING_PRIV_H__

static inline void cleaning_policy_param_error(ocf_cache_t cache,
const char *param_name, uint32_t min, uint32_t max)
{
Expand All @@ -17,3 +20,5 @@ static inline void cleaning_policy_param_error(ocf_cache_t cache,
return -OCF_ERR_INVAL; \
} \
})

#endif /* __CLEANING_PRIV_H__ */
7 changes: 3 additions & 4 deletions src/cleaning/nop.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __LAYER_CLEANING_POLICY_NOP_H__
#define __LAYER_CLEANING_POLICY_NOP_H__
#ifndef __CLEANING_NOP_H__
#define __CLEANING_NOP_H__

#include "cleaning.h"
#include "nop_structs.h"

void cleaning_nop_perform_cleaning(ocf_cache_t cache, ocf_cleaner_end_t cmpl);

#endif
#endif /* __CLEANING_NOP_H__ */
11 changes: 0 additions & 11 deletions src/cleaning/nop_structs.h

This file was deleted.

6 changes: 3 additions & 3 deletions src/concurrency/ocf_cache_line_concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef OCF_CACHE_CONCURRENCY_H_
#define OCF_CACHE_CONCURRENCY_H_
#ifndef __OCF_CACHE_LINE_CONCURRENCY_H__
#define __OCF_CACHE_LINE_CONCURRENCY_H__

#include "../utils/utils_alock.h"

Expand Down Expand Up @@ -189,4 +189,4 @@ ocf_cache_line_concurrency(ocf_cache_t cache)
return cache->device->concurrency.cache_line;
}

#endif /* OCF_CONCURRENCY_H_ */
#endif /* __OCF_CACHE_LINE_CONCURRENCY_H__ */
6 changes: 3 additions & 3 deletions src/concurrency/ocf_concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef OCF_CONCURRENCY_H_
#define OCF_CONCURRENCY_H_
#ifndef __OCF_CONCURRENCY_H__
#define __OCF_CONCURRENCY_H__

#include "../ocf_cache_priv.h"

Expand All @@ -30,4 +30,4 @@ void ocf_concurrency_deinit(struct ocf_cache *cache);

#include "ocf_cache_line_concurrency.h"

#endif /* OCF_CONCURRENCY_H_ */
#endif /* __OCF_CONCURRENCY_H__ */
8 changes: 4 additions & 4 deletions src/concurrency/ocf_metadata_concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Copyright(c) 2026 Unvertical
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OCF_METADATA_CONCURRENCY_H__
#define __OCF_METADATA_CONCURRENCY_H__

#include "../ocf_cache_priv.h"
#include "../ocf_space.h"
#include "../ocf_queue_priv.h"

#ifndef __OCF_METADATA_CONCURRENCY_H__
#define __OCF_METADATA_CONCURRENCY_H__

#define OCF_METADATA_RD 0
#define OCF_METADATA_WR 1

Expand Down Expand Up @@ -163,4 +163,4 @@ void ocf_collision_start_exclusive_access(struct ocf_metadata_lock *metadata_loc
uint32_t page);
void ocf_collision_end_exclusive_access(struct ocf_metadata_lock *metadata_lock,
uint32_t page);
#endif
#endif /* __OCF_METADATA_CONCURRENCY_H__ */
6 changes: 3 additions & 3 deletions src/concurrency/ocf_mio_concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef OCF_MIO_CONCURRENCY_H_
#define OCF_MIO_CONCURRENCY_H_
#ifndef __OCF_MIO_CONCURRENCY_H__
#define __OCF_MIO_CONCURRENCY_H__

#include "../utils/utils_alock.h"

Expand All @@ -23,4 +23,4 @@ int ocf_mio_concurrency_init(struct ocf_alock **self,

void ocf_mio_concurrency_deinit(struct ocf_alock **self);

#endif
#endif /* __OCF_MIO_CONCURRENCY_H__ */
6 changes: 3 additions & 3 deletions src/concurrency/ocf_pio_concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __OCF_PIO_CONCURRENCY_H_
#define __OCF_PIO_CONCURRENCY_H_
#ifndef __OCF_PIO_CONCURRENCY_H__
#define __OCF_PIO_CONCURRENCY_H__

#include "../utils/utils_alock.h"

Expand All @@ -17,4 +17,4 @@ int ocf_pio_concurrency_init(struct ocf_alock **self, ocf_cache_t cache);

void ocf_pio_concurrency_deinit(struct ocf_alock **self);

#endif
#endif /* __OCF_PIO_CONCURRENCY_H__ */
6 changes: 3 additions & 3 deletions src/engine/cache_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef __CACHE_ENGINE_H_
#define __CACHE_ENGINE_H_
#ifndef __CACHE_ENGINE_H__
#define __CACHE_ENGINE_H__

#include "../ocf_request.h"

Expand Down Expand Up @@ -49,4 +49,4 @@ void ocf_engine_hndl_flush_req(struct ocf_request *req);

void ocf_engine_hndl_discard_req(struct ocf_request *req);

#endif
#endif /* __CACHE_ENGINE_H__ */
6 changes: 3 additions & 3 deletions src/engine/engine_bf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#ifndef ENGINE_BF_H_
#define ENGINE_BF_H_
#ifndef __ENGINE_BF_H__
#define __ENGINE_BF_H__

void ocf_engine_backfill(struct ocf_request *req);

#endif /* ENGINE_BF_H_ */
#endif /* __ENGINE_BF_H__ */
Loading
Loading