1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Peter Rajnoha 8b965bd3d5 pvremove: make sure even invalid info is removed from lvmcache on pvremove
The lvmcache info might be resued, most notably in lvm shell.
We need to be sure that even lvmcache_info marked as invalid
is removed from the lvmcache so it does not confuse any subsequent
code/commands executed later on.

Problematic example with the lvm shell:

lvm> pvs
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sda        lvm2 ---  128.00m 128.00m

Before this patch (/dev/sda still displayed in a way):
======================================================

lvm> pvremove /dev/sda
  Labels on physical volume "/dev/sda" successfully wiped

(without lvmetad)
lvm> pvs
  No physical volume label read from /dev/sda

(with lvmetad)
lvm> pvs
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sda        lvm2 ---  128.00m 128.00m

With this patch applied:
========================

lvm> pvremove /dev/sda
  Labels on physical volume "/dev/sda" successfully wiped

(without lvmetad)
lvm> pvs

(with lvmetad)
lvm> pvs
2015-10-23 15:48:06 +02:00
..
cache_manip.c segtypes: Use SEG_TYPE_NAME_ string constants. 2015-09-22 19:04:12 +01:00
lv_alloc.h thin: simplify thin volume creation 2014-10-26 18:37:13 +01:00
lv_manip.c cleanup: indents 2015-10-22 22:46:10 +02:00
lv.c raid: Add metadata dev information to reports. 2015-10-02 10:09:28 +01:00
lv.h raid: Add metadata dev information to reports. 2015-10-02 10:09:28 +01:00
merge.c pool: validate pool_metadata has proper suffix 2015-09-11 21:52:27 +02:00
metadata-exported.h cache: warn if caching causes troubles 2015-09-10 17:27:30 +02:00
metadata.c vgcreate: initialize new PVs only in first vg_write 2015-09-14 13:22:22 -05:00
metadata.h thin: check for overprovisioning 2015-07-03 16:13:14 +02:00
mirror.c segtypes: Add and use new segtype macros. 2015-09-24 14:59:07 +01:00
pool_manip.c segtypes: Use SEG_TYPE_NAME_ string constants. 2015-09-22 19:04:12 +01:00
pv_alloc.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
pv_manip.c pvremove: make sure even invalid info is removed from lvmcache on pvremove 2015-10-23 15:48:06 +02:00
pv_map.c raid_manip: v2 fix multi-segment misallocation on 'lvconvert --repair' 2015-01-16 13:44:16 +01:00
pv_map.h Track unreserved space for all alloc policies and then permit NORMAL to place 2012-02-01 02:10:45 +00:00
pv.c pv: add 'mem' arg for pv_uuid_dup and pv_name_dup 2015-09-21 14:21:42 +02:00
pv.h pv: add 'mem' arg for pv_uuid_dup and pv_name_dup 2015-09-21 14:21:42 +02:00
raid_manip.c raid_manip: fix wrong image size allocation on raid10 "lvconvert --replace ..." 2015-10-02 17:09:37 +02:00
replicator_manip.c macros: Wrap PRI with FMT. 2015-07-06 15:09:17 +01:00
segtype.c clean: remove unneeded assign 2013-06-17 09:34:56 +02:00
segtype.h segtypes: Use flags in raid segtype macros. 2015-09-24 20:43:18 +01:00
snapshot_manip.c segtypes: Use SEG_TYPE_NAME_ string constants. 2015-09-22 19:04:12 +01:00
thin_manip.c thin: enhance logging 2015-10-13 14:38:52 +02:00
vg.c cleanup: unused header files (Coverity) 2015-08-18 15:00:08 +02:00
vg.h Add lvmlockd 2015-07-02 15:42:26 -05:00