mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: enable usage of kernel low_water_mark
Now with correctly functioning dmeventd enable usage of low_water_mark for faster reaction on pool's threshold. When user select e.g. 80% as a threshold value, dmeventd doesn't need to wait 10 seconds till monitoring timer expires, but nearly instantly resizes thin-pool to fit bellow threshold.
This commit is contained in:
parent
099466939e
commit
99237f0908
@ -1,5 +1,6 @@
|
||||
Version 2.02.133 -
|
||||
======================================
|
||||
Thin pool targets uses low_water_mark from profile.
|
||||
Dropping 'yet' from error of unsupported thick snapshot of snapshots.
|
||||
Do not support unpartitioned DASD devices with CDL formatted with pvcreate.
|
||||
For thins use flush for suspend only when volume size is reduced.
|
||||
|
@ -266,6 +266,8 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
||||
struct lvinfo info;
|
||||
uint64_t transaction_id = 0;
|
||||
unsigned attr;
|
||||
uint64_t low_water_mark;
|
||||
int threshold;
|
||||
|
||||
if (!_thin_target_present(cmd, NULL, &attr))
|
||||
return_0;
|
||||
@ -294,10 +296,20 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
||||
return 0;
|
||||
}
|
||||
|
||||
threshold = find_config_tree_int(seg->lv->vg->cmd,
|
||||
activation_thin_pool_autoextend_threshold_CFG,
|
||||
lv_config_profile(seg->lv));
|
||||
if (threshold < 50)
|
||||
threshold = 50;
|
||||
if (threshold < 100)
|
||||
low_water_mark = (len * threshold + 99) / 100;
|
||||
else
|
||||
low_water_mark = len;
|
||||
|
||||
if (!dm_tree_node_add_thin_pool_target(node, len,
|
||||
seg->transaction_id,
|
||||
metadata_dlid, pool_dlid,
|
||||
seg->chunk_size, seg->low_water_mark,
|
||||
seg->chunk_size, low_water_mark,
|
||||
seg->zero_new_blocks ? 0 : 1))
|
||||
return_0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user