mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
pvresize: Fix orphan PV size calculation.
The size of any metadata must be ignored when calculating the size of an
orphan PV.
Bug introduced by 603b45e0ed
("pvresize: Do
not use pv_read (get the PV from orphan VG).")
This commit is contained in:
parent
ebac2ed5be
commit
5eee73bd7c
@ -2278,7 +2278,7 @@ static int _text_pv_resize(const struct format_type *fmt,
|
||||
}
|
||||
|
||||
/* If there's a VG, reduce size by counting in pe_start and metadata areas. */
|
||||
if (vg) {
|
||||
if (vg && !is_orphan_vg(vg->name)) {
|
||||
size_reduction = pv_pe_start(pv);
|
||||
if ((mda = fid_get_mda_indexed(fid, pvid, ID_LEN, 1)) &&
|
||||
(mdac = mda->metadata_locn))
|
||||
|
Loading…
Reference in New Issue
Block a user