mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
01156de6f7
A number of places are working on a specific dev when they call lvmcache_info_from_pvid() to look up an info struct based on a pvid. In those cases, pass the dev being used to lvmcache_info_from_pvid(). When a dev is specified, lvmcache_info_from_pvid() will verify that the cached info it's using matches the dev being processed before returning the info. Calling code will not mistakenly get info for the wrong dev when duplicate devs exist. This confusion was happening when scanning labels when duplicate devs existed. label_read for the first dev would add an info struct to lvmcache for that dev/pvid. label_read for the second dev would see the pvid in lvmcache from first dev, and mistakenly conclude that the label_read from the second dev can be skipped because it's already been done. By verifying that the dev for the cached pvid matches the dev being read, this mismatch is avoided and the label is actually read from the second duplicate. |
||
---|---|---|
.. | ||
cache_manip.c | ||
lv_alloc.h | ||
lv_manip.c | ||
lv.c | ||
lv.h | ||
merge.c | ||
metadata-exported.h | ||
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 | ||
replicator_manip.c | ||
segtype.c | ||
segtype.h | ||
snapshot_manip.c | ||
thin_manip.c | ||
vg.c | ||
vg.h |