1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: rename thin_pool_chunk_size_calculation -> ..size_policy and rename "default" policy to "generic"

Just to be consistent with existing naming we use.
This commit is contained in:
Peter Rajnoha 2013-10-04 12:30:33 +02:00
parent baf95bbff7
commit 8cf0810d57
5 changed files with 9 additions and 9 deletions

View File

@ -252,9 +252,9 @@ allocation {
# be placed on different PVs from the pool data. # be placed on different PVs from the pool data.
thin_pool_metadata_require_separate_pvs = 0 thin_pool_metadata_require_separate_pvs = 0
# Specify chunk size calculation method for thin pool volumes. # Specify chunk size calculation policy for thin pool volumes.
# Possible options are: # Possible options are:
# "default" - if thin_pool_chunk_size is defined, use it. # "generic" - if thin_pool_chunk_size is defined, use it.
# Otherwise, calcucate the chunk size based on # Otherwise, calcucate the chunk size based on
# estimation and device hints exposed in sysfs: # estimation and device hints exposed in sysfs:
# the minimum_io_size. The chunk size is always # the minimum_io_size. The chunk size is always
@ -265,7 +265,7 @@ allocation {
# performance based on device hints exposed in # performance based on device hints exposed in
# sysfs: the optimal_io_size. The chunk size is # sysfs: the optimal_io_size. The chunk size is
# always at least 512KiB. # always at least 512KiB.
# thin_pool_chunk_size_calculation = "default" # thin_pool_chunk_size_policy = "generic"
# Specify the minimal chunk size (in KB) for thin pool volumes. # Specify the minimal chunk size (in KB) for thin pool volumes.
# Use of the larger chunk size may improve perfomance for plain # Use of the larger chunk size may improve perfomance for plain

View File

@ -107,7 +107,7 @@ cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separa
cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL) cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL)
cfg(allocation_thin_pool_zero_CFG, "thin_pool_zero", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_ZERO, vsn(2, 2, 99), NULL) cfg(allocation_thin_pool_zero_CFG, "thin_pool_zero", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_ZERO, vsn(2, 2, 99), NULL)
cfg(allocation_thin_pool_discards_CFG, "thin_pool_discards", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_THIN_POOL_DISCARDS, vsn(2, 2, 99), NULL) cfg(allocation_thin_pool_discards_CFG, "thin_pool_discards", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_THIN_POOL_DISCARDS, vsn(2, 2, 99), NULL)
cfg(allocation_thin_pool_chunk_size_calculation_CFG, "thin_pool_chunk_size_calculation", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_THIN_POOL_CHUNK_SIZE_CALCULATION, vsn(2, 2, 101), NULL) cfg(allocation_thin_pool_chunk_size_policy_CFG, "thin_pool_chunk_size_policy", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_THIN_POOL_CHUNK_SIZE_POLICY, vsn(2, 2, 101), NULL)
cfg(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_INT, 0, vsn(2, 2, 99), NULL) cfg(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_INT, 0, vsn(2, 2, 99), NULL)

View File

@ -71,7 +71,7 @@
#define DEFAULT_THIN_POOL_MAX_METADATA_SIZE (16 * 1024 * 1024) /* KB */ #define DEFAULT_THIN_POOL_MAX_METADATA_SIZE (16 * 1024 * 1024) /* KB */
#define DEFAULT_THIN_POOL_MIN_METADATA_SIZE 2048 /* KB */ #define DEFAULT_THIN_POOL_MIN_METADATA_SIZE 2048 /* KB */
#define DEFAULT_THIN_POOL_OPTIMAL_SIZE (128 * 1024 * 1024) /* KB */ #define DEFAULT_THIN_POOL_OPTIMAL_SIZE (128 * 1024 * 1024) /* KB */
#define DEFAULT_THIN_POOL_CHUNK_SIZE_CALCULATION "default" #define DEFAULT_THIN_POOL_CHUNK_SIZE_POLICY "generic"
#define DEFAULT_THIN_POOL_CHUNK_SIZE 64 /* KB */ #define DEFAULT_THIN_POOL_CHUNK_SIZE 64 /* KB */
#define DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE 512 /* KB */ #define DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE 512 /* KB */
#define DEFAULT_THIN_POOL_DISCARDS "passdown" #define DEFAULT_THIN_POOL_DISCARDS "passdown"

View File

@ -726,7 +726,7 @@ struct lvcreate_params {
int activation_skip; /* activation skip flags */ int activation_skip; /* activation skip flags */
activation_change_t activate; /* non-snapshot, non-mirror */ activation_change_t activate; /* non-snapshot, non-mirror */
thin_discards_t discards; /* thin */ thin_discards_t discards; /* thin */
#define THIN_CHUNK_SIZE_CALC_METHOD_DEFAULT 0x01 #define THIN_CHUNK_SIZE_CALC_METHOD_GENERIC 0x01
#define THIN_CHUNK_SIZE_CALC_METHOD_PERFORMANCE 0x02 #define THIN_CHUNK_SIZE_CALC_METHOD_PERFORMANCE 0x02
int thin_chunk_size_calc_method; int thin_chunk_size_calc_method;

View File

@ -573,8 +573,8 @@ static int _get_pool_chunk_size_calc(const char *str,
int *chunk_size_calc_method, int *chunk_size_calc_method,
uint32_t *chunk_size) uint32_t *chunk_size)
{ {
if (!strcasecmp(str, "default")) { if (!strcasecmp(str, "generic")) {
*chunk_size_calc_method = THIN_CHUNK_SIZE_CALC_METHOD_DEFAULT; *chunk_size_calc_method = THIN_CHUNK_SIZE_CALC_METHOD_GENERIC;
*chunk_size = DEFAULT_THIN_POOL_CHUNK_SIZE * 2; *chunk_size = DEFAULT_THIN_POOL_CHUNK_SIZE * 2;
} }
else if (!strcasecmp(str, "performance")) { else if (!strcasecmp(str, "performance")) {
@ -598,7 +598,7 @@ int update_profilable_pool_params(struct cmd_context *cmd, struct profile *profi
if (!(passed_args & PASS_ARG_CHUNK_SIZE)) { if (!(passed_args & PASS_ARG_CHUNK_SIZE)) {
if (!(*chunk_size = find_config_tree_int(cmd, allocation_thin_pool_chunk_size_CFG, profile) * 2)) { if (!(*chunk_size = find_config_tree_int(cmd, allocation_thin_pool_chunk_size_CFG, profile) * 2)) {
str = find_config_tree_str(cmd, allocation_thin_pool_chunk_size_calculation_CFG, profile); str = find_config_tree_str(cmd, allocation_thin_pool_chunk_size_policy_CFG, profile);
if (!_get_pool_chunk_size_calc(str, chunk_size_calc_method, chunk_size)) if (!_get_pool_chunk_size_calc(str, chunk_size_calc_method, chunk_size))
return_0; return_0;
} }