mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
1e696b0c15
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. |
||
---|---|---|
.. | ||
lv_alloc.h | ||
lv_manip.c | ||
merge.c | ||
metadata-exported.h | ||
metadata.c | ||
metadata.h | ||
mirror.c | ||
pv_alloc.h | ||
pv_manip.c | ||
pv_map.c | ||
pv_map.h | ||
segtype.c | ||
segtype.h | ||
snapshot_manip.c |