]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/ocf/src/metadata/metadata_partition_structs.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / ocf / src / metadata / metadata_partition_structs.h
1 /*
2 * Copyright(c) 2012-2018 Intel Corporation
3 * SPDX-License-Identifier: BSD-3-Clause-Clear
4 */
5
6 #ifndef __METADATA_PARTITION_STRUCTS_H__
7 #define __METADATA_PARTITION_STRUCTS_H__
8
9 #include "../utils/utils_list.h"
10 #include "../cleaning/cleaning.h"
11 #include "../eviction/eviction.h"
12
13 struct ocf_user_part_config {
14 char name[OCF_IO_CLASS_NAME_MAX];
15 uint32_t min_size;
16 uint32_t max_size;
17 int16_t priority;
18 ocf_cache_mode_t cache_mode;
19 struct {
20 uint8_t valid : 1;
21 uint8_t added : 1;
22 uint8_t eviction : 1;
23 /*!< This bits is setting during partition sorting,
24 * and means that can evict from this partition
25 */
26 } flags;
27 };
28
29 struct ocf_user_part_runtime {
30 uint32_t curr_size;
31 uint32_t head;
32 struct eviction_policy eviction;
33 struct cleaning_policy cleaning;
34 };
35
36 struct ocf_user_part {
37 struct ocf_user_part_config *config;
38 struct ocf_user_part_runtime *runtime;
39
40 struct ocf_lst_entry lst_valid;
41 };
42
43
44 #endif /* __METADATA_PARTITION_STRUCTS_H__ */