]> sourceware.org Git - lvm2.git/commit
Rework lock-override options and locking_type settings
authorDavid Teigland <teigland@redhat.com>
Thu, 7 Jun 2018 20:33:02 +0000 (15:33 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 7 Jun 2018 21:47:15 +0000 (16:47 -0500)
commite6bb780d24246666fa05948ec449a8137280b443
tree20631b44553328e891a4c660ac21077ffdcf11b5
parentc7c7017f0c12ebab4e1aef9d9a9fabd4ec2adfe3
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.
lib/commands/toolcontext.h
lib/config/config_settings.h
lib/locking/locking.c
lib/locking/locking.h
lib/misc/lvm-globals.c
lib/misc/lvm-globals.h
lib/misc/sharedlib.c
tools/command-lines.in
tools/lvmcmdline.c
This page took 0.036246 seconds and 5 git commands to generate.