1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/misc
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
..
crc_gen.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
crc.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
crc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
intl.h doc: change fsf address 2016-01-21 12:11:37 +01:00
last-path-component.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lib.h device-mapper: Fork libdm internally. 2018-05-16 13:00:50 +01:00
lvm-exec.c Merge branch 'master' into 2018-05-11-fork-libdm 2018-05-16 13:43:02 +01:00
lvm-exec.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-file.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-file.h log: separate output and make it possible to use given FDs 2016-08-09 18:24:45 +02:00
lvm-flock.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-flock.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm-globals.c Rework lock-override options and locking_type settings 2018-06-07 16:47:15 -05:00
lvm-globals.h Rework lock-override options and locking_type settings 2018-06-07 16:47:15 -05:00
lvm-maths.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-maths.h lib: Move lcm and gcd to lib/misc for wider use. 2016-08-18 14:06:13 +01:00
lvm-percent.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-percent.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm-signal.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-signal.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm-string.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-string.h lvm-string: add function to detect component LV suffix 2017-12-19 15:28:07 +01:00
lvm-wrappers.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm-wrappers.h fix: make udev_get_library_context available also for non-udev compilations 2016-04-01 15:35:22 +02:00
sharedlib.c Rework lock-override options and locking_type settings 2018-06-07 16:47:15 -05:00
sharedlib.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
util.h util: add clz() and use __builtin_clz() if available 2016-12-13 20:41:29 +00:00