1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Peter Rajnoha fccb1bb276 report: make devices, metadata_devices, seg_pe_ranges and seg_metadata_le_ranges fields consistent
There are two basic groups of fields for LV segment device reporting:
  - related to LV segment's devices: devices and seg_pe_ranges
  - related to LV segment's metadata devices: metadata_devices and seg_metadata_le_ranges

The devices and metadata_devices report devices in this format:
    "device_name(extent_start)"

The seg_pe_ranges and seg_metadata_le_ranges report devices in
this format:
    "device_name:extent_start-extent_end"

This patch reverts partly what commit 7f74a99502
(v 2.02.140) introduced in this area - it added [] for
hidden devices to mark them for all four fields mentioned above.

We won't be marking hidden devices in devices and metadata_devices
fields.

The seg_metadata_le_ranges field will have hidden devices marked -
it's new enough that we don't need to care about compatibility much
yet.

The seg_pe_ranges is old enough that we shouldn't be changing this
one - so we're reverting to not marking hidden devices here.
Instead, there's going to be a new field "seg_le_ranges" which
is going to replace the seg_pe_ranges and it will mark hidden devices -
this is going to be introduced in a patch later.

So in the end we'll end up with:

   (LV segment's devices)
   devices field with "device_name(extent_start)" format, not marking hidden devices
   seg_pe_ranges field with "device_name:extent_start-extent_end" format, not marking hidden devices (deprecated, new seg_le_ranges should be used instead for standardized format)
   seg_le_ranges field with "device_name:extent_start-extent_end" format, marking hidden devices

   (LV segment's metadata devices)
   metadata_devices field with "device_name:extent_start-extent_end" format, not marking hidden devices
   seg_metadata_le_ranges field with "device_name:extent_start-extent_end" format, marking hidden devices

Also, both seg_le_ranges and seg_metadata_le_ranges will honour the
report/list_item_separator setting which can be used to configure
the delimiter used for list items.

So, to sum it up, we will recommend using the new seg_le_ranges and
seg_metadata_le_ranges fields because they display devices with
standard extent range format, they can mark hidden devices and they
honour the report/list_item_separator setting.

We'll be keeping devices,seg_pe_ranges and metadata_devices fields
for compatibility.
2016-01-19 14:30:20 +01:00
..
cache_manip.c cache: ensure there is no NULL str 2015-11-09 17:04:10 +01:00
lv_alloc.h snapshot: relocate alloc_snapshot_seg 2016-01-14 11:34:05 +01:00
lv_manip.c lvmanip: fix last commit and drop else 2016-01-14 11:55:47 +01:00
lv.c report: make devices, metadata_devices, seg_pe_ranges and seg_metadata_le_ranges fields consistent 2016-01-19 14:30:20 +01:00
lv.h report: change _format_pvsegs to return list instead of plain string, change associated report fields from STR to STR_LIST 2016-01-19 14:17:41 +01:00
merge.c pool: validate pool_metadata has proper suffix 2015-09-11 21:52:27 +02:00
metadata-exported.h lvm2app: fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported} 2016-01-15 14:42:18 +01:00
metadata.c vgcfgrestore: Retain allocatable PV attribute. 2016-01-14 00:46:45 +00:00
metadata.h lvmanip: add lv_is_snapshot 2016-01-14 11:34:04 +01:00
mirror.c pvmove: Remove unused find_pvmove_lv_from_pvname. 2015-11-13 18:06:08 +00:00
pool_manip.c cleanup: use display_lvname in pmspare 2015-11-18 22:17:26 +01:00
pv_alloc.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
pv_manip.c pvremove: make sure even invalid info is removed from lvmcache on pvremove 2015-10-23 15:48:06 +02:00
pv_map.c raid_manip: v2 fix multi-segment misallocation on 'lvconvert --repair' 2015-01-16 13:44:16 +01:00
pv_map.h Track unreserved space for all alloc policies and then permit NORMAL to place 2012-02-01 02:10:45 +00:00
pv.c pv: add 'mem' arg for pv_uuid_dup and pv_name_dup 2015-09-21 14:21:42 +02:00
pv.h pv: add 'mem' arg for pv_uuid_dup and pv_name_dup 2015-09-21 14:21:42 +02:00
raid_manip.c raid: drop unneeded NULL test 2015-11-17 19:01:25 +01:00
replicator_manip.c macros: Wrap PRI with FMT. 2015-07-06 15:09:17 +01:00
segtype.c clean: remove unneeded assign 2013-06-17 09:34:56 +02:00
segtype.h lib: pass mem pool to check_transient_status 2015-12-01 13:01:28 +01:00
snapshot_manip.c snapshot: relocate alloc_snapshot_seg 2016-01-14 11:34:05 +01:00
thin_manip.c cleanup: use same type 2015-10-29 12:14:20 +01:00
vg.c cleanup: rename vg_ondisk to vg_committed 2015-11-25 11:11:21 +01:00
vg.h cleanup: rename vg_ondisk to vg_committed 2015-11-25 11:11:21 +01:00