1
0
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:
Alasdair G Kergon 2014-01-17 01:12:04 +00:00
parent ebac2ed5be
commit 5eee73bd7c

View File

@ -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))