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. |
||
---|---|---|
.. | ||
archive.c | ||
archiver.c | ||
archiver.h | ||
export.c | ||
flags.c | ||
format-text.c | ||
format-text.h | ||
import_vsn1.c | ||
import-export.h | ||
import.c | ||
layout.h | ||
tags.c | ||
text_export.h | ||
text_import.h | ||
text_label.c |