ocf/src/metadata/metadata_segment.h
Robert Baldyga 253734b160 Move misplaced function declaration to the appropriate header
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-11 00:49:52 +02:00

52 lines
1.4 KiB
C

/*
* Copyright(c) 2020-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __METADATA_SEGMENT_OPS_H__
#define __METADATA_SEGMENT_OPS_H__
#include "../utils/utils_pipeline.h"
#include "metadata_raw.h"
#include <ocf/ocf_def.h>
struct ocf_metadata_segment
{
struct ocf_metadata_raw *raw;
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,
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);
void ocf_metadata_segment_destroy(struct ocf_cache *cache,
struct ocf_metadata_segment *self);
void ocf_metadata_check_crc(ocf_pipeline_t pipeline,
void *priv, ocf_pipeline_arg_t arg);
void ocf_metadata_calculate_crc(ocf_pipeline_t pipeline,
void *priv, ocf_pipeline_arg_t arg);
void ocf_metadata_flush_segment(ocf_pipeline_t pipeline,
void *priv, ocf_pipeline_arg_t arg);
void ocf_metadata_load_segment(ocf_pipeline_t pipeline,
void *priv, ocf_pipeline_arg_t arg);
#endif