This repository has been archived by the owner on Apr 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
config.h
67 lines (49 loc) · 1.68 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef _CONFIG_H
#define _CONFIG_H
#include <confuse.h>
struct program_params {
char *conf_file_path;
void *lvm2_handle;
cfg_t *cfg;
};
struct program_params* new_program_params();
void free_program_params(struct program_params *pp);
float get_read_multiplier(struct program_params *pp, const char *lv_name);
float get_write_multiplier(struct program_params *pp, const char *lv_name);
float get_hit_score(struct program_params *pp, const char *lv_name);
float get_score_scaling_factor(struct program_params *pp, const char *lv_name);
/**
* Return name of device for provided volume at tier
*/
const char *get_tier_device(struct program_params *pp, const char *lv_name, int tier);
/**
* Return tier of device named dev in volume lv_name
*
* -1 if not found
*/
int get_device_tier(struct program_params *pp, const char *lv_name, const char *dev);
/**
* Returns pinning score for provided volume
*/
float get_tier_pinning_score(struct program_params *pp, const char *lv_name,
int tier);
/**
* checks if tiers with larger tier value exist for provided volume
*/
int lower_tiers_exist(struct program_params *pp, const char *lv_name, int tier);
/**
* checks if tiers with smaller tier value exist for provided volume
*/
int higher_tiers_exist(struct program_params *pp, const char *lv_name, int tier);
/**
* Return max used space on tier by volume
*/
long int get_max_space_tier(struct program_params *pp, const char *lv_name,
int tier);
/**
* read configuration file
*/
int read_config(struct program_params *pp);
const char *get_volume_lv(struct program_params *pp, const char *lv_name);
const char *get_volume_vg(struct program_params *pp, const char *lv_name);
#endif