mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Fix pvs segfault when pv mda attributes requested for not available PV.
This commit is contained in:
parent
cd96532e78
commit
92a4d6b28a
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.45 -
|
Version 2.02.45 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix pvs segfault when pv mda attributes requested for not available PV.
|
||||||
Add support for ext4 resize in fsadm
|
Add support for ext4 resize in fsadm
|
||||||
Move locking_type reading inside init_locking().
|
Move locking_type reading inside init_locking().
|
||||||
Rename get_vgs() to get_vgnames() and clarify related error messages.
|
Rename get_vgs() to get_vgnames() and clarify related error messages.
|
||||||
|
@ -868,8 +868,7 @@ static int _pvmdafree_disp(struct dm_report *rh, struct dm_pool *mem,
|
|||||||
const char *pvid = (const char *)(&((struct id *) data)->uuid);
|
const char *pvid = (const char *)(&((struct id *) data)->uuid);
|
||||||
struct metadata_area *mda;
|
struct metadata_area *mda;
|
||||||
|
|
||||||
info = info_from_pvid(pvid, 0);
|
if ((info = info_from_pvid(pvid, 0)))
|
||||||
|
|
||||||
dm_list_iterate_items(mda, &info->mdas) {
|
dm_list_iterate_items(mda, &info->mdas) {
|
||||||
if (!mda->ops->mda_free_sectors)
|
if (!mda->ops->mda_free_sectors)
|
||||||
continue;
|
continue;
|
||||||
@ -908,12 +907,11 @@ static int _pvmdasize_disp(struct dm_report *rh, struct dm_pool *mem,
|
|||||||
const void *data, void *private)
|
const void *data, void *private)
|
||||||
{
|
{
|
||||||
struct lvmcache_info *info;
|
struct lvmcache_info *info;
|
||||||
uint64_t min_mda_size;
|
uint64_t min_mda_size = 0;
|
||||||
const char *pvid = (const char *)(&((struct id *) data)->uuid);
|
const char *pvid = (const char *)(&((struct id *) data)->uuid);
|
||||||
|
|
||||||
info = info_from_pvid(pvid, 0);
|
|
||||||
|
|
||||||
/* PVs could have 2 mdas of different sizes (rounding effect) */
|
/* PVs could have 2 mdas of different sizes (rounding effect) */
|
||||||
|
if ((info = info_from_pvid(pvid, 0)))
|
||||||
min_mda_size = _find_min_mda_size(&info->mdas);
|
min_mda_size = _find_min_mda_size(&info->mdas);
|
||||||
|
|
||||||
return _size64_disp(rh, mem, field, &min_mda_size, private);
|
return _size64_disp(rh, mem, field, &min_mda_size, private);
|
||||||
|
Loading…
Reference in New Issue
Block a user