1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
David Teigland 79c4971210 label_scan: remove extra label scan and read for orphan PVs
When process_each_pv() calls vg_read() on the orphan VG, the
internal implementation was doing an unnecessary
lvmcache_label_scan() and two unnecessary label_read() calls
on each orphan.  Some of those unnecessary label scans/reads
would sometimes be skipped due to caching, but the code was
always doing at least one unnecessary read on each orphan.

The common format_text case was also unecessarily calling into
the format-specific pv_read() function which actually did nothing.

By analyzing each case in which vg_read() was being called on
the orphan VG, we can say that all of the label scans/reads
in vg_read_orphans are unnecessary:

1. reporting commands: the information saved in lvmcache by
the original label scan can be reported.  There is no advantage
to repeating the label scan on the orphans a second time before
reporting it.

2. pvcreate/vgcreate/vgextend: these all share a common
implementation in pvcreate_each_device().  That function
already rescans labels after acquiring the orphan VG lock,
which ensures that the command is using valid lvmcache
information.
2018-04-20 11:22:45 -05:00
..
cache_manip.c cache: disallow to combine format 2 with mq 2018-03-19 12:02:08 +01:00
lv_alloc.h tidy: declaration names match implementation 2017-07-20 19:16:41 +02:00
lv_manip.c cleanup: enhance debug message 2018-04-20 12:17:01 +02:00
lv.c activation: separate reporting of error and monitoring status 2018-02-12 22:14:59 +01:00
lv.h replicator: remove the code 2017-10-13 16:20:42 -05:00
merge.c cleanup: correcting macro wrapping 2018-04-20 12:17:01 +02:00
metadata-exported.h scan: use bcache for label scan and vg read 2018-04-20 11:19:24 -05:00
metadata-liblvm.c scan: use new label_scan for lvmcache_label_scan 2018-04-20 11:19:32 -05:00
metadata.c label_scan: remove extra label scan and read for orphan PVs 2018-04-20 11:22:45 -05:00
metadata.h label_scan: remove extra label scan and read for orphan PVs 2018-04-20 11:22:45 -05:00
mirror.c cleanup: display_lvname update message 2018-04-20 12:17:01 +02:00
pool_manip.c lvconvert: use excl activation for conversion 2018-01-17 14:43:34 +01:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_manip.c cleanup: drop unneeded headerfiles 2017-11-07 21:26:11 +01:00
pv_map.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_map.h tidy: declaration names match implementation 2017-07-20 19:16:41 +02:00
pv.c lvmcache: add optional dev arg to lvmcache_info_from_pvid 2016-06-07 15:15:47 -05:00
pv.h tidy: declaration names match implementation 2017-07-20 19:16:41 +02:00
raid_manip.c raid: support raid5_n convenience type on conversion to raid10 2018-03-09 21:23:16 +01:00
segtype.c lvconvert: add infrastructure for RaidLV reshaping support 2017-02-24 05:20:58 +01:00
segtype.h cleanup: decode dso path just once 2018-02-12 22:15:03 +01:00
snapshot_manip.c snapshot: relocate common code validation for snapshot origin 2017-10-27 17:07:42 +02:00
takeover_matrix.h lvconvert: add infrastructure for RaidLV reshaping support 2017-02-24 05:20:58 +01:00
thin_manip.c thin: Improve overprovisioning and repair warnings. 2017-10-09 19:48:00 +01:00
vg.c metadata: Remove unused vg.cft_precommitted 2017-11-14 01:22:09 +00:00
vg.h metadata: Remove unused vg.cft_precommitted 2017-11-14 01:22:09 +00:00