1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/lib/format_text
David Teigland 5fb15b1934 metadata: improve write and commit code
The vg_write/vg_commit code was imprecise, uncommented, and
hard to understand.  Rewrite it with clearer, cleaner code,
extensive comments, descriptions of how it works, and add
more info in debugging output.

The minor changes in behavior are to things that were
either incorrect or probably unintended:

- vg_write/vg_commit no longer check that the current vgname at
  the start of the text metadata matches the vgname being written.
  This has already been done at least twice by the time they are
  called, and repeating it again against the same cached data has
  no use.

- A fragment of old removed code had been left behind that checked
  if the old unused alignment policy would wrap.  It was still
  being checked to decide if the metadata area was full, which
  could possibly cause an incorrect full metadata failure.

- vg_remove now clears both the raw_locns in the mda_header that
  point to committed metadata (raw_locn slot 0) and precommitted
  metadata (raw_locn slot 1).  Previously it fully cleared the
  committed slot, and would only clear the offset field in the
  precommitted slot if it saw a problem with the metadata in the
  vg being removed.

- read_metadata_location_summary was wrongly comparing the number
  of wrapped bytes with an offset to report an error about the
  metadata being too large.  This wrong check is removed, it
  could have resulted in erroneous errors.
2018-09-11 10:06:25 -05:00
..
archive.c Merge branch 'master' into 2018-05-11-fork-libdm 2018-06-01 13:04:12 +01:00
archiver.c Remove lvmetad 2018-07-11 11:26:42 -05:00
archiver.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
export.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
flags.c vdo: introduce segment types and manip functions 2018-07-09 15:28:35 +02:00
format-text.c metadata: improve write and commit code 2018-09-11 10:06:25 -05:00
format-text.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
import_vsn1.c Remove lvmetad 2018-07-11 11:26:42 -05:00
import-export.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
import.c Remove lvmetad 2018-07-11 11:26:42 -05:00
layout.h Remove independent metadata areas 2018-06-13 12:25:19 -05:00
text_export.h coverity: fix possible resource leak of descendants_buffer in _print_historical_lv fn 2016-05-31 09:36:58 +02:00
text_import.h doc: change fsf address 2016-01-21 12:11:37 +01:00
text_label.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00