diff options
author | Alasdair Kergon <agk@redhat.com> | 2007-11-05 01:47:49 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2007-11-05 01:47:49 +0000 |
commit | fd4ff5d201226dba471d3d24f9017d5aa313a977 (patch) | |
tree | e69702d5221efb5fb56756b20d22efcc37761698 /lib/format_text/import_vsn1.c | |
parent | 2b0249ec42b2a346b760614d5940da2845294abc (diff) | |
download | lvm2-fd4ff5d201226dba471d3d24f9017d5aa313a977.tar.gz |
Show 'not usable' space when PV is too large for device in pvdisplay.
Ignore and fix up any excessive device size found in metadata.
Diffstat (limited to 'lib/format_text/import_vsn1.c')
-rw-r--r-- | lib/format_text/import_vsn1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index a733ae689..0f2fd697e 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -215,8 +215,8 @@ static int _read_pv(struct format_instance *fid, struct dm_pool *mem, pv->pe_alloc_count = 0; pv->fmt = fid->fmt; - /* Fix up pv size if missing */ - if (!pv->size && pv->dev) { + /* Fix up pv size if missing or impossibly large */ + if ((!pv->size || pv->size > (1ULL << 62)) && pv->dev) { if (!dev_get_size(pv->dev, &pv->size)) { log_error("%s: Couldn't get size.", pv_dev_name(pv)); return 0; |