1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Peter Rajnoha 1e696b0c15 Do not reset position in metadata ring buffer on vgrename and vgcfgrestore.
We should write metadata into next position in the ring buffer while calling
vgrename and vgcfgrestore. At this code level (_vg_write_raw), we were not able
to determine if this is a rename or not. If yes, then accompanying VG structure
passed here has a new name set, not the old one.

When looking for a location where to put metadata next, we were given a NULL
value because of failed VG name comparison (in _find_vg_rlocn) between the
name in existing metadata and metadata we're just about to write.

This resets the position in the ring buffer, overwriting any existing metadata
(and also incorrectly updates the cache to "orphan" afterwards).

This patch just adds old_name item in struct volume_group that we can check and use
if necessary and detect renames at lower layers as well.

The same applies for vgcfgrestore, but here we're using a special value of
old_name, an empty string, to disable the check with existing metadata totally.
2010-04-14 13:09:16 +00:00
..
lv_alloc.h Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
lv_manip.c Permit mimage LVs to be striped in lvcreate and lvresize. 2010-04-09 01:00:10 +00:00
merge.c Permit mimage LVs to be striped in lvcreate and lvresize. 2010-04-09 01:00:10 +00:00
metadata-exported.h Do not reset position in metadata ring buffer on vgrename and vgcfgrestore. 2010-04-14 13:09:16 +00:00
metadata.c Do not reset position in metadata ring buffer on vgrename and vgcfgrestore. 2010-04-14 13:09:16 +00:00
metadata.h Add del_pvl_from_vgs() and move prototypes into metadata-exported.h 2010-04-13 17:25:44 +00:00
mirror.c Permit mimage LVs to be striped in lvcreate and lvresize. 2010-04-09 01:00:10 +00:00
pv_alloc.h Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_manip.c Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_map.c Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
pv_map.h Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
segtype.c Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
segtype.h Improve target type compatibility checking in _percent_run(). 2010-01-15 16:35:26 +00:00
snapshot_manip.c Refactor snapshot-merge deptree and device removal to support info-by-uuid 2010-02-17 22:59:46 +00:00