mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
vgread: fix fid transfer for lvm1 and pool format
Assign fid as the last step before returning VG. Make the format reader for 'lvm1' and 'pool' equal to 'lvm2' format reader. It has caused memory corruption to lvmetad as it later calls destroy_instance() to allocated fid. This patch should fix problems with crashing test lvmetad-lvm1.sh.
This commit is contained in:
parent
5e7eae59da
commit
1951798d72
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.99 -
|
Version 2.02.99 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix assignment order for vg fid for lvm1 and pool format.
|
||||||
Fix memleak in dmeventd thin plugin in device list obtaining err path.
|
Fix memleak in dmeventd thin plugin in device list obtaining err path.
|
||||||
Add explicit message about unsupported pvmove for thin/thinpool volumes.
|
Add explicit message about unsupported pvmove for thin/thinpool volumes.
|
||||||
Fix lvmetad error path in lvmetad_vg_lookup() for null vgname.
|
Fix lvmetad error path in lvmetad_vg_lookup() for null vgname.
|
||||||
|
@ -200,8 +200,6 @@ static struct volume_group *_format1_vg_read(struct format_instance *fid,
|
|||||||
if (dm_list_empty(&pvs))
|
if (dm_list_empty(&pvs))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
vg_set_fid(vg, fid);
|
|
||||||
|
|
||||||
if (!_check_vgs(&pvs, vg))
|
if (!_check_vgs(&pvs, vg))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
@ -226,6 +224,8 @@ static struct volume_group *_format1_vg_read(struct format_instance *fid,
|
|||||||
if ((vg->status & PARTIAL_VG) && !_fix_partial_vg(vg, &pvs))
|
if ((vg->status & PARTIAL_VG) && !_fix_partial_vg(vg, &pvs))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
|
vg_set_fid(vg, fid);
|
||||||
|
|
||||||
return vg;
|
return vg;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
|
@ -122,8 +122,6 @@ static struct volume_group *_pool_vg_read(struct format_instance *fid,
|
|||||||
if (!read_pool_pds(fid->fmt, vg_name, vg->vgmem, &pds))
|
if (!read_pool_pds(fid->fmt, vg_name, vg->vgmem, &pds))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
vg_set_fid(vg, fid);
|
|
||||||
|
|
||||||
/* Setting pool seqno to 1 because the code always did this,
|
/* Setting pool seqno to 1 because the code always did this,
|
||||||
* although we don't think it's needed. */
|
* although we don't think it's needed. */
|
||||||
vg->seqno = 1;
|
vg->seqno = 1;
|
||||||
@ -155,6 +153,8 @@ static struct volume_group *_pool_vg_read(struct format_instance *fid,
|
|||||||
if (!import_pool_segments(&vg->lvs, vg->vgmem, usp, sp_count))
|
if (!import_pool_segments(&vg->lvs, vg->vgmem, usp, sp_count))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
|
vg_set_fid(vg, fid);
|
||||||
|
|
||||||
return vg;
|
return vg;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
|
Loading…
Reference in New Issue
Block a user