1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
David Teigland e6bb780d24 Rework lock-override options and locking_type settings
The last commit related to this was incomplete:
  "Implement lock-override options without locking type"

This is further reworking and reduction of the locking.[ch]
layer which handled all clustering, but is now only used
for file locking.  The "locking types" that this layer
implemented were removed previously, leaving only the
standard file locking.  (Some cluster-related artifacts
remain to be cleared out later.)

Command options to override or modify locking behavior
are reimplemented here without using the locking types.
Also, deprecated locking_type values are recognized,
and implemented as if one of the equivalent override
options was set.

Options that override file locking are:

. --nolocking disables all file locking.

. --readonly grants read lock requests without actually
  taking a file lock, and refuses write lock requests.

. --ignorelockingfailure tries to set up file locks and
  uses them normally if possible.  When not possible, it
  behaves like --readonly, but allows activation.

. --sysinit is the same as ignorelockingfailure.

. global/metadata_read_only acquires actual read file
  locks, and refuses write lock requests.

(Some of these options could probably be deprecated
because they were added as workarounds to various
locking_type behaviors that are now deprecated.)

The locking_type setting now has one valid value: 1 which
refers to standard file locking.  Configs that contain
deprecated values are recognized and still work in
largely the same way:

. 0 disabled all locking, now implemented like --nolocking
  is set.  Allow the nolocking option in all commands.

. 1 is the normal file locking setting and is unchanged.

. 2 was for external locking which was not used, and
  reverts to normal file locking.

. 3 was for cluster/clvm.  This reverts to normal file
  locking, and prints messages about lvmlockd.

. 4 was equivalent to readonly, now implemented like
  --readonly is set.

. 5 disabled all locking, now implemented like
  --nolocking is set.
2018-06-07 16:47:15 -05:00
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore tools: add generated headers to .gitignore 2017-03-10 13:13:41 +00:00
args.h Remove clvmd and associated code 2018-06-05 11:09:13 -05:00
cmdnames.h doc: change fsf address 2016-01-21 12:11:37 +01:00
command-lines.in Rework lock-override options and locking_type settings 2018-06-07 16:47:15 -05:00
command.c scan: skip device rescan in vg_read 2018-04-20 11:23:14 -05:00
command.h cleanup: fix some typos 2017-07-10 14:58:33 +02:00
commands.h scan: skip device rescan in vg_read 2018-04-20 11:23:14 -05:00
dmsetup.c device-mapper: Fork libdm internally. 2018-05-16 13:00:50 +01:00
dumpconfig.c lvmconfig: Add options to produce file preamble 2017-08-05 16:23:34 +01:00
errors.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
formats.c doc: change fsf address 2016-01-21 12:11:37 +01:00
license.inc pre-release 2017-03-28 16:11:35 +01:00
lv_props.h commands: new method for defining commands 2017-02-13 08:20:10 -06:00
lv_types.h commands: recognize raid variations 2017-02-13 08:20:10 -06:00
lvchange.c use exclusive file lock on VG for activation 2018-06-07 16:17:04 +01:00
lvconvert_poll.c debug: more display_lvname usage 2017-06-27 08:28:36 +02:00
lvconvert_poll.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvconvert.c Remove unused clvm variations for active LVs 2018-06-07 16:17:04 +01:00
lvcreate.c Remove unused clvm variations for active LVs 2018-06-07 16:17:04 +01:00
lvdisplay.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvextend.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd-static.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
lvm2cmdline.h commands: fix memory debug for cmd defs 2017-05-01 15:27:14 -05:00
lvm-static.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm.c debug: tracing error path 2017-06-27 00:27:36 +02:00
lvmcmdlib.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvmcmdline.c Rework lock-override options and locking_type settings 2018-06-07 16:47:15 -05:00
lvmdiskscan.c filter: use bcache for filter reads 2018-05-10 16:03:19 -05:00
lvpoll.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvreduce.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvremove.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvrename.c toollib: make it possible to also process internal VGs, add 'include_internal' switch to process_each_vg fn 2016-06-20 11:33:42 +02:00
lvresize.c lvresize: support passing --yes to fsadm 2017-06-21 14:03:29 +02:00
lvscan.c tidy: Add missing underscores to statics. 2017-10-18 15:58:13 +01:00
Makefile.in build: libbase.a 2018-06-04 13:53:07 +01:00
polldaemon.c Remove unused clvm variations for active LVs 2018-06-07 16:17:04 +01:00
pvchange.c lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
pvck.c pvck: allow checking at user specified offsets 2018-05-11 11:23:51 -05:00
pvcreate.c filter: use bcache for filter reads 2018-05-10 16:03:19 -05:00
pvdisplay.c lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
pvmove_poll.c pvmove: move code from tools to lib 2017-12-01 12:18:32 +01:00
pvmove_poll.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pvmove.c Remove unused clvm variations for active LVs 2018-06-07 16:17:04 +01:00
pvremove.c pvremove: skip lvmlockd locks for forced clearing 2018-05-30 09:25:45 -05:00
pvresize.c pvcreate: add prompt when setting dev size 2017-04-27 13:25:41 -05:00
pvscan.c use exclusive file lock on VG for activation 2018-06-07 16:17:04 +01:00
reporter.c Merge branch 'master' into 2018-05-11-fork-libdm 2018-06-01 13:04:12 +01:00
segtypes.c doc: change fsf address 2016-01-21 12:11:37 +01:00
stub.h Remove lvm1 and pool disk formats 2018-04-30 16:55:02 -05:00
tags.c doc: change fsf address 2016-01-21 12:11:37 +01:00
tool.h device-mapper: Fork libdm internally. 2018-05-16 13:00:50 +01:00
toollib.c Remove VG lock ordering check 2018-06-07 16:17:04 +01:00
toollib.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
tools.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
vals.h Remove lvm1 and pool disk formats 2018-04-30 16:55:02 -05:00
vgcfgbackup.c coverity: avoid memleak 2017-11-07 21:26:09 +01:00
vgcfgrestore.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
vgchange.c use exclusive file lock on VG for activation 2018-06-07 16:17:04 +01:00
vgck.c toollib: make it possible to also process internal VGs, add 'include_internal' switch to process_each_vg fn 2016-06-20 11:33:42 +02:00
vgconvert.c Remove lvm1 and pool disk formats 2018-04-30 16:55:02 -05:00
vgcreate.c Remove clvmd and associated code 2018-06-05 11:09:13 -05:00
vgdisplay.c tidy: Add missing underscores to statics. 2017-10-18 15:58:13 +01:00
vgexport.c lvmlockd: primarily use vg_is_shared 2018-06-01 13:15:22 -05:00
vgextend.c filter: use bcache for filter reads 2018-05-10 16:03:19 -05:00
vgimport.c lvmlockd: primarily use vg_is_shared 2018-06-01 13:15:22 -05:00
vgimportclone.c Remove VG lock ordering check 2018-06-07 16:17:04 +01:00
vgmerge.c lvmlockd: primarily use vg_is_shared 2018-06-01 13:15:22 -05:00
vgmknodes.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
vgreduce.c cleanup: add missing WARNING into log_warn 2016-11-25 15:01:27 +01:00
vgremove.c tidy: Add missing underscores to statics. 2017-10-18 15:58:13 +01:00
vgrename.c Remove VG lock ordering check 2018-06-07 16:17:04 +01:00
vgscan.c Remove lvm1 and pool disk formats 2018-04-30 16:55:02 -05:00
vgsplit.c Remove clvmd and associated code 2018-06-05 11:09:13 -05:00