mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +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 603b45e0ed1032875f587eda3391c47b6652303c ("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…
x
Reference in New Issue
Block a user