1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
David Teigland b4be988732 vgchange/lvchange: enforce the shared VG lock from lvmlockd
The vgchange/lvchange activation commands read the VG, and
don't write it, so they acquire a shared VG lock from lvmlockd.
When other commands fail to acquire a shared VG lock from
lvmlockd, a warning is printed and they continue without it.
(Without it, the VG metadata they display from lvmetad may
not be up to date.)

vgchange/lvchange -a shouldn't continue without the shared
lock for a couple reasons:

. Usually they will just continue on and fail to acquire the
  LV locks for activation, so continuing is pointless.

. More importantly, without the sh VG lock, the VG metadata
  used by the command may be stale, and the LV locks shown
  in the VG metadata may no longer be current.  In the
  case of sanlock, this would result in odd, unpredictable
  errors when lvmlockd doesn't find the expected lock on
  disk.  In the case of dlm, the invalid LV lock could be
  granted for the non-existing LV.

The solution is to not continue after the shared lock fails,
in the same way that a command fails if an exclusive lock fails.
2015-07-17 15:35:34 -05:00
..
cache_manip.c cache: handle policy_name separately 2015-07-15 13:10:22 +02:00
lv_alloc.h thin: simplify thin volume creation 2014-10-26 18:37:13 +01:00
lv_manip.c alloc: Fix lvextend failure when varying stripes. 2015-07-15 23:12:54 +01:00
lv.c macros: Wrap PRI with FMT. 2015-07-06 15:09:17 +01:00
lv.h Add lvmlockd 2015-07-02 15:42:26 -05:00
merge.c cleanup: drop duplicated seg test 2015-07-15 13:10:22 +02:00
metadata-exported.h cache: handle policy_name separately 2015-07-15 13:10:22 +02:00
metadata.c vgchange/lvchange: enforce the shared VG lock from lvmlockd 2015-07-17 15:35:34 -05:00
metadata.h thin: check for overprovisioning 2015-07-03 16:13:14 +02:00
mirror.c macros: Wrap PRI with FMT. 2015-07-06 15:09:17 +01:00
pool_manip.c pool: fix typo in error message: then -> than 2014-12-04 09:18:16 +01:00
pv_alloc.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
pv_manip.c pvremove: Avoid metadata re-reads & related error messages. 2015-01-06 14:27:30 +01: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_vg_name: do not expose internal orphans to lvm2 users 2014-03-19 00:57:59 +01:00
pv.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
raid_manip.c Add lvmlockd 2015-07-02 15:42:26 -05: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 thin: errrorwhenfull support 2015-01-14 14:52:05 +01:00
snapshot_manip.c cleanup: fix typo and use vg mempool 2014-09-24 10:54:47 +02:00
thin_manip.c thin: fix warning for overprovisioning 2015-07-15 13:10:21 +02:00
vg.c Add lvmlockd 2015-07-02 15:42:26 -05:00
vg.h Add lvmlockd 2015-07-02 15:42:26 -05:00