1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/format_text
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
..
archive.c Fix tools to report error when stopped by user. 2009-12-03 19:18:33 +00:00
archiver.c Do not reset position in metadata ring buffer on vgrename and vgcfgrestore. 2010-04-14 13:09:16 +00:00
archiver.h Fix remote metadata backup for clvmd 2009-04-22 09:39:45 +00:00
export.c Export function out_text_with_comment() and add outfc() macro that checks 2010-01-07 14:45:28 +00:00
flags.c Rename segment and lv status flag from SNAPSHOT_MERGE to MERGING. 2010-01-13 01:56:18 +00:00
format-text.c Do not reset position in metadata ring buffer on vgrename and vgcfgrestore. 2010-04-14 13:09:16 +00:00
format-text.h Switch status from 32-bit to 64-bit 2009-11-24 22:55:55 +00:00
import_vsn1.c Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
import-export.h Suppress repeated errors about the same missing PV uuids. 2010-03-17 02:11:18 +00:00
import.c Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
layout.h Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
tags.c Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
text_export.h Export function out_text_with_comment() and add outfc() macro that checks 2010-01-07 14:45:28 +00:00
text_import.h Update a few more uint64_t's related to the 64-bit status change. 2009-12-04 17:48:32 +00:00
text_label.c #define an INTERNAL_ERROR macro and use it throughout LVM. 2009-12-16 19:22:11 +00:00