mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
When lvmetad is used and lvmcache update function (lvmcache_update_vgname_and_id) was called to update existing lvmcache records, a condition was met which made to retun from the update function immediately, effectively making it NOOP. It seems there's no reason for such condition and lvmcache should be update appropriately even when lvmetad used as lvmcache may be reused, most notably in lvm shell. It's possible this is a remnant of the lvmetad development code which didn't get removed for some reason and the bug didn't get spotted because lvm shell is not used often (the condition dates back to 2012 or so). Example, lvmetad and lvm shell used: lvm> pvs PV VG Fmt Attr PSize PFree /dev/sda vg lvm2 a-- 124.00m 124.00m Before this patch: ================== lvm> vgremove vg Volume group "vg" successfully removed lvm> pvs With this patch applied: ======================== lvm> vgremove vg Volume group "vg" successfully removed lvm> pvs PV VG Fmt Attr PSize PFree /dev/sda lvm2 --- 128.00m 128.00m