
Starting cache in a standby mode requires access to a valid cleaning policy type. If the policy is stored only in the superblock, it may be overridden by one of the metadata passive updates. To prevent losing the information it should be stored in cache's runtime metadata. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
37 lines
980 B
C
37 lines
980 B
C
/*
|
|
* Copyright(c) 2012-2021 Intel Corporation
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
|
|
#ifndef __OCF_MNGT_COMMON_H__
|
|
#define __OCF_MNGT_COMMON_H__
|
|
|
|
void cache_mngt_core_deinit(ocf_core_t core);
|
|
|
|
void cache_mngt_core_remove_from_meta(ocf_core_t core);
|
|
|
|
void cache_mngt_core_remove_from_cache(ocf_core_t core);
|
|
|
|
void cache_mngt_core_deinit_attached_meta(ocf_core_t core);
|
|
|
|
void cache_mngt_core_remove_from_cleaning_pol(ocf_core_t core);
|
|
|
|
int _ocf_cleaning_thread(void *priv);
|
|
|
|
int cache_mngt_thread_io_requests(void *data);
|
|
|
|
int ocf_mngt_add_partition_to_cache(struct ocf_cache *cache,
|
|
ocf_part_id_t part_id, const char *name, uint32_t min_size,
|
|
uint32_t max_size, uint8_t priority, bool valid);
|
|
|
|
int ocf_mngt_cache_lock_init(ocf_cache_t cache);
|
|
void ocf_mngt_cache_lock_deinit(ocf_cache_t cache);
|
|
|
|
bool ocf_mngt_cache_is_locked(ocf_cache_t cache);
|
|
|
|
void __set_cleaning_policy(ocf_cache_t cache,
|
|
ocf_cleaning_t new_cleaning_policy);
|
|
|
|
#endif /* __OCF_MNGT_COMMON_H__ */
|