mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-25 01:34:38 +03:00
Thin add thin_pool_metadata_require_separate_pvs
Allow to set different policy for pool from mirrors.
This commit is contained in:
parent
b8cac455bd
commit
bd15208cd7
@ -213,6 +213,11 @@ devices {
|
|||||||
# until version 2.02.85.
|
# until version 2.02.85.
|
||||||
#
|
#
|
||||||
# mirror_logs_require_separate_pvs = 0
|
# mirror_logs_require_separate_pvs = 0
|
||||||
|
#
|
||||||
|
# Set to 1 to guarantee that thin pool metadata will always
|
||||||
|
# be placed on different PVs from the pool data.
|
||||||
|
#
|
||||||
|
# thin_pool_metadata_require_separate_pvs = 0
|
||||||
#}
|
#}
|
||||||
|
|
||||||
# This section that allows you to configure the nature of the
|
# This section that allows you to configure the nature of the
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#define DEFAULT_DMEVENTD_MONITOR 1
|
#define DEFAULT_DMEVENTD_MONITOR 1
|
||||||
#define DEFAULT_BACKGROUND_POLLING 1
|
#define DEFAULT_BACKGROUND_POLLING 1
|
||||||
|
|
||||||
|
#define DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS 0
|
||||||
#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 */
|
||||||
|
|
||||||
|
@ -788,6 +788,8 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
|
|||||||
ah->region_size = region_size;
|
ah->region_size = region_size;
|
||||||
ah->alloc = alloc;
|
ah->alloc = alloc;
|
||||||
ah->area_multiple = _calc_area_multiple(segtype, area_count, stripes);
|
ah->area_multiple = _calc_area_multiple(segtype, area_count, stripes);
|
||||||
|
ah->mirror_logs_separate = find_config_tree_bool(cmd, "allocation/mirror_logs_require_separate_pvs",
|
||||||
|
DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS);
|
||||||
|
|
||||||
if (segtype_is_raid(segtype)) {
|
if (segtype_is_raid(segtype)) {
|
||||||
if (metadata_area_count) {
|
if (metadata_area_count) {
|
||||||
@ -813,6 +815,9 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
|
|||||||
/* thin_pool uses region_size to pass metadata size in extents */
|
/* thin_pool uses region_size to pass metadata size in extents */
|
||||||
ah->log_len = ah->region_size;
|
ah->log_len = ah->region_size;
|
||||||
ah->region_size = 0;
|
ah->region_size = 0;
|
||||||
|
ah->mirror_logs_separate =
|
||||||
|
find_config_tree_bool(cmd, "allocation/thin_pool_metadata_require_separate_pvs",
|
||||||
|
DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS);
|
||||||
} else {
|
} else {
|
||||||
ah->log_area_count = metadata_area_count;
|
ah->log_area_count = metadata_area_count;
|
||||||
ah->log_len = !metadata_area_count ? 0 :
|
ah->log_len = !metadata_area_count ? 0 :
|
||||||
@ -829,8 +834,6 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
|
|||||||
|
|
||||||
ah->maximise_cling = find_config_tree_bool(cmd, "allocation/maximise_cling", DEFAULT_MAXIMISE_CLING);
|
ah->maximise_cling = find_config_tree_bool(cmd, "allocation/maximise_cling", DEFAULT_MAXIMISE_CLING);
|
||||||
|
|
||||||
ah->mirror_logs_separate = find_config_tree_bool(cmd, "allocation/mirror_logs_require_separate_pvs", DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS);
|
|
||||||
|
|
||||||
return ah;
|
return ah;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user