1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
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
..
activate Use UUIDs instead of names while processing event handlers. 2010-04-14 13:01:38 +00:00
cache Change most remaining log_error WARNING messages to log_warn. 2010-04-01 10:34:09 +00:00
commands Change most remaining log_error WARNING messages to log_warn. 2010-04-01 10:34:09 +00:00
config Don't ignore error if resuming any LV fails in resume_lvs. 2010-04-12 11:52:53 +00:00
datastruct Remove unnecessary / duplicate dm_list macros and functions. 2009-11-25 20:44:07 +00:00
device Fix is_partitioned_dev not to attempt to reopen device. 2010-04-06 17:36:41 +00:00
display Cleanup returns for void functions. 2009-12-11 13:16:37 +00:00
error Fix last check-ins: seg can be NULL. 2009-02-28 20:04:24 +00:00
filters Use fixed buffer to prevent stack overflow in persistent filter dump. 2010-01-06 13:25:36 +00:00
format1 INSTALL rules updates 2010-04-09 21:42:48 +00:00
format_pool Call add_pvl_to_vgs() and del_pvl_from_vgs() from more places. 2010-04-13 17:26:03 +00:00
format_text Do not reset position in metadata ring buffer on vgrename and vgcfgrestore. 2010-04-14 13:09:16 +00:00
freeseg Fix reporting of LV fields alongside unallocated PV segments. 2008-06-25 16:52:27 +00:00
label Use log_error macro consistently throughout in place of log_err. 2009-07-15 20:02:46 +00:00
locking Mask LCK_HOLD flag in cluster VG locks for compatibility reasons. 2010-04-13 14:36:24 +00:00
log Also honour abort_on_internal_errors when log_fn is set. 2010-03-23 18:18:49 +00:00
metadata Do not reset position in metadata ring buffer on vgrename and vgcfgrestore. 2010-04-14 13:09:16 +00:00
mirror Use UUIDs instead of names while processing event handlers. 2010-04-14 13:01:38 +00:00
misc Use UUIDs instead of names while processing event handlers. 2010-04-14 13:01:38 +00:00
mm Better debug message for Un/Locked memory size. 2010-04-01 14:53:47 +00:00
report Use dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1' 2010-02-15 20:27:33 +00:00
snapshot Use UUIDs instead of names while processing event handlers. 2010-04-14 13:01:38 +00:00
striped Use macro outsize() with check for error return value. 2010-01-07 14:46:51 +00:00
unknown Fix the "const discarded" warnings introduced in the unknown segment patch. 2009-10-22 10:38:07 +00:00
uuid Use log_error macro consistently throughout in place of log_err. 2009-07-15 20:02:46 +00:00
zero Attempt to load dm-zero module if zero target needed but not present. (mbroz) 2009-05-27 13:05:53 +00:00
Makefile.in INSTALL rules updates 2010-04-09 21:42:48 +00:00