mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-11 09:18:25 +03:00
Revert 'preserve_pe_start' related code in _text_pv_setup
If pv_setup was given a non-zero pe_start it would short-circuit establishing a default pv->pe_align. pv->pe_align=0 would result in a divide by zero in _mda_setup(). 'vgconvert -M2 $vgname' hit this. .pv_write still properly preserves pe_start if it was supplied.
This commit is contained in:
parent
282029eb45
commit
e32f9edc3d
@ -1,7 +1,7 @@
|
||||
Version 2.02.51 -
|
||||
================================
|
||||
Add --dataalignmentoffset to pvcreate to shift start of aligned data area.
|
||||
Preserve pe_start in .pv_setup and .pv_write if pe_start was supplied.
|
||||
Preserve pe_start in .pv_write if pe_start was supplied.
|
||||
Fix _mda_setup() to not check first mda's size before pe_align rounding.
|
||||
Formalize pe_start policy as split between .pv_setup and .pv_write.
|
||||
Document -I option of clvmd in the man page.
|
||||
|
@ -1735,10 +1735,8 @@ static int _text_pv_setup(const struct format_type *fmt,
|
||||
/* FIXME Default from config file? vgextend cmdline flag? */
|
||||
pv->status |= ALLOCATABLE_PV;
|
||||
} else {
|
||||
if (pe_start) {
|
||||
if (pe_start)
|
||||
pv->pe_start = pe_start;
|
||||
goto preserve_pe_start;
|
||||
}
|
||||
|
||||
if (!data_alignment)
|
||||
data_alignment = find_config_tree_int(pv->fmt->cmd,
|
||||
@ -1760,7 +1758,6 @@ static int _text_pv_setup(const struct format_type *fmt,
|
||||
return 0;
|
||||
}
|
||||
|
||||
preserve_pe_start:
|
||||
if (extent_count)
|
||||
pe_end = pe_start + extent_count * extent_size - 1;
|
||||
if (!_mda_setup(fmt, pe_start, pe_end, pvmetadatacopies,
|
||||
|
Loading…
Reference in New Issue
Block a user