mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
79c4971210
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. |
||
---|---|---|
.. | ||
cache_manip.c | ||
lv_alloc.h | ||
lv_manip.c | ||
lv.c | ||
lv.h | ||
merge.c | ||
metadata-exported.h | ||
metadata-liblvm.c | ||
metadata.c | ||
metadata.h | ||
mirror.c | ||
pool_manip.c | ||
pv_alloc.h | ||
pv_manip.c | ||
pv_map.c | ||
pv_map.h | ||
pv.c | ||
pv.h | ||
raid_manip.c | ||
segtype.c | ||
segtype.h | ||
snapshot_manip.c | ||
takeover_matrix.h | ||
thin_manip.c | ||
vg.c | ||
vg.h |