mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-27 01:57:55 +03:00
Patch fixes hidden problem with lvm metadata caching. When the pretest was made, only the commited data have been cached back since the call lv_info_by_lvid() triggers mda read operation. However call of lv_suspend_if_active() also reads precommited metadata. The problem is visible in this sequence of calls: vg_write(), suspend_lv(), vg_commit(), resume_lv() which may end with leaving outdated mda in lvm cache, since vg_write() drops cached metadata and vg_commit() only transforms precommited to commited metadata, but in the case of pretesting we have no precommited mda available so the cache will continue to use old metadata. This happens, when suspend LV is inactive.