master - pvresize: Fix orphan PV size calculation.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5eee73bd7cb8e4712ad5e5d13a3bffb78e02c9ca Commit: 5eee73bd7cb8e4712ad5e5d13a3bffb78e02c9ca Parent: ebac2ed5be9ba2bd4c606209f1a9396e32dafe88 Author: Alasdair G Kergon <[email protected]> AuthorDate: Fri Jan 17 01:12:04 2014 +0000 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Fri Jan 17 01:12:04 2014 +0000
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).")
--- lib/format_text/format-text.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/format_text/format-text.c +1 -1
@@ -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))