mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
pool: fix recalculate of pool chunk_size
Before checking seg_type of the first area, check there is some existing area. Since we now support error and zero segtypes, these do not have any PV area present.
This commit is contained in:
parent
85c7629345
commit
46eeb62b04
@ -440,7 +440,7 @@ int recalculate_pool_chunk_size_with_dev_hints(struct logical_volume *pool_lv,
|
||||
}
|
||||
|
||||
dm_list_iterate_items(seg, &pool_data_lv->segments) {
|
||||
switch (seg_type(seg, 0)) {
|
||||
switch (seg->area_count ? seg_type(seg, 0) : AREA_UNASSIGNED) {
|
||||
case AREA_PV:
|
||||
pv = seg_pv(seg, 0);
|
||||
if (chunk_size_calc_policy == THIN_CHUNK_SIZE_CALC_METHOD_PERFORMANCE)
|
||||
|
Loading…
Reference in New Issue
Block a user