mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
pools: workaround hints
Missing code for stacked hint estimation
This commit is contained in:
parent
c28a7706ed
commit
e223c801fc
@ -324,16 +324,25 @@ int recalculate_pool_chunk_size_with_dev_hints(struct logical_volume *pool_lv,
|
|||||||
|
|
||||||
pool_data_lv = seg_lv(first_seg(pool_lv), 0);
|
pool_data_lv = seg_lv(first_seg(pool_lv), 0);
|
||||||
dm_list_iterate_items(seg, &pool_data_lv->segments) {
|
dm_list_iterate_items(seg, &pool_data_lv->segments) {
|
||||||
pv = seg_pv(seg, 0);
|
switch (seg_type(seg, 0)) {
|
||||||
if (chunk_size_calc_policy == THIN_CHUNK_SIZE_CALC_METHOD_PERFORMANCE)
|
case AREA_PV:
|
||||||
hint = dev_optimal_io_size(cmd->dev_types, pv_dev(pv));
|
pv = seg_pv(seg, 0);
|
||||||
else
|
if (chunk_size_calc_policy == THIN_CHUNK_SIZE_CALC_METHOD_PERFORMANCE)
|
||||||
hint = dev_minimum_io_size(cmd->dev_types, pv_dev(pv));
|
hint = dev_optimal_io_size(cmd->dev_types, pv_dev(pv));
|
||||||
if (!hint)
|
else
|
||||||
continue;
|
hint = dev_minimum_io_size(cmd->dev_types, pv_dev(pv));
|
||||||
if (previous_hint)
|
if (!hint)
|
||||||
hint = _lcm(previous_hint, hint);
|
continue;
|
||||||
previous_hint = hint;
|
|
||||||
|
if (previous_hint)
|
||||||
|
hint = _lcm(previous_hint, hint);
|
||||||
|
previous_hint = hint;
|
||||||
|
break;
|
||||||
|
case AREA_LV:
|
||||||
|
/* FIXME: hint for stacked (raid) LVs - estimate geometry from LV ?? */
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hint)
|
if (!hint)
|
||||||
|
@ -46,6 +46,7 @@ lvremove -f $vg
|
|||||||
|
|
||||||
lvcreate -n cpool_meta -m 1 --type raid1 -l 10 $vg
|
lvcreate -n cpool_meta -m 1 --type raid1 -l 10 $vg
|
||||||
lvcreate -n cpool -m 1 --type raid1 -l 10 $vg
|
lvcreate -n cpool -m 1 --type raid1 -l 10 $vg
|
||||||
|
lvs -a -o+seg_pe_ranges $vg
|
||||||
lvconvert --yes --type cache-pool --poolmetadata $vg/cpool_meta $vg/cpool
|
lvconvert --yes --type cache-pool --poolmetadata $vg/cpool_meta $vg/cpool
|
||||||
lvcreate -n corigin --type cache --cachepool $vg/cpool -l 10
|
lvcreate -n corigin --type cache --cachepool $vg/cpool -l 10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user