1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

15695 Commits

Author SHA1 Message Date
David Teigland
f2ff06d675 Implement lock-override options without locking type
The options: --nolocking, --readonly, --sysinit
override, or make exceptions to, the normal file locking
behavior.  Implement these by just checking for the
options in the file locking path instead of using
special locking types.
2018-06-06 16:31:59 -05:00
David Teigland
55521be2cb tests: system_id remove clustered vg test 2018-06-06 14:35:27 -05:00
David Teigland
802382e21f tests: remove -cn option from some commands 2018-06-06 14:04:19 -05:00
David Teigland
b7da704566 Remove locking infrastructure from activation paths
Basic LV functions:

  activate_lv(), deactivate_lv(),
  suspend_lv(), resume_lv()

were routed through the locking infrastruture on the way to:

  lv_activate_with_filter(), lv_deactivate(),
  lv_suspend_if_active(), lv_resume_if_active()

This commit removes the locking infrastructure from the
middle and calls the later functions directly from the former.

There were a couple of ancillary steps that the locking
infrastructure added along the way which are still included:

  - critical section inc/dec during suspend/resume
  - checking for active component LVs during activate

The "activation" file lock (serializing activation) has not
been kept because activation commands have been changed to
take the VG file lock exclusively which makes the activation
lock unused and unnecessary.
2018-06-06 13:58:34 -05:00
David Teigland
58a9254252 use exclusive file lock on VG for activation
Make activation commands:
  vgchange -ay, lvchange -ay, pvscan -aay

take an exclusive file lock on the VG to serialize
multiple concurrent activation commands which could
otherwise interfere with each other.
2018-06-06 13:58:34 -05:00
David Teigland
d2d8dd7f7f Remove VG lock ordering check
Four commands lock two VGs at a time:

- vgsplit and vgmerge already have their own logic to
  acquire the locks in the correct order.

- vgimportclone and vgrename disable this ordering check.
2018-06-06 13:58:34 -05:00
David Teigland
c157c43f7c Remove unused clvm variations for active LVs
Different flavors of activate_lv() and lv_is_active()
which are meaningful in a clustered VG can be eliminated
and replaced with whatever that flavor already falls back
to in a local VG.

e.g. lv_is_active_exclusive_locally() is distinct from
lv_is_active() in a clustered VG, but in a local VG they
are equivalent.  So, all instances of the variant are
replaced with the basic local equivalent.

For local VGs, the same behavior remains as before.
For shared VGs, lvmlockd was written with the explicit
requirement of local behavior from these functions
(lvmlockd requires locking_type 1), so the behavior
in shared VGs also remains the same.
2018-06-06 13:58:34 -05:00
David Teigland
eb60029245 Remove more clvm code 2018-06-06 13:58:34 -05:00
David Teigland
3c657adc0a lvmlockd: fix missing lock_type null check
Missed checking if vg->lock_type is NULL in commit db8d3bdfa:
  lvmlockd: enable mirror split and merge with dlm lock_type
2018-06-06 13:58:03 -05:00
David Teigland
c67bd8b47b devices: clean up io error messages
Remove the io error message from bcache.c since it is not
very useful without the device path.

Make the io error messages from dev_read_bytes/dev_write_bytes
more user friendly.
2018-06-06 10:08:25 -05:00
Joe Thornber
74460cd009 device_mapper: fixup a couple of includes
"libdevmapper.h" -> "device_mapper/libdevmapper.h"
2018-06-06 14:45:16 +01:00
David Teigland
3e781ea446 Remove clvmd and associated code
More code reduction and simplification can follow.
2018-06-05 11:09:13 -05:00
Heinz Mauelshagen
11384637fb WHATS_NEW 2018-06-05 16:24:19 +02:00
Heinz Mauelshagen
3810fd8d0d test: add convcenience conversion tests linear <-> striped
Add tests for linear <-> striped|raid* conversions.

Add region_size config to reshape tests to avoid test
failures in case of it being defined unexpectedly in lvm.conf.

Related: rhbz1439925
Related: rhbz1447809
2018-06-05 16:23:18 +02:00
Heinz Mauelshagen
bd7cdd0b09 lvconvert: support linear <-> striped convenience conversions
"lvconvert --type {linear|striped|raid*} ..." on a striped/linear
LV provides convenience interim type to convert to the requested
final layout similar to the given raid* <-> raid* conveninece types.

Whilst on it, add missing raid5_n convenince type from raid5* to raid10.

Resolves: rhbz1439925
Resolves: rhbz1447809
Resolves: rhbz1573255
2018-06-05 16:23:18 +02:00
Heinz Mauelshagen
de66704253 segtype: add linear
Add linear segtype addressing FIXME in preparation
for linear <-> striped convenience conversion support
2018-06-05 16:23:18 +02:00
Joe Thornber
2eda683a20 build: base/Makefile
.gitignore hid it.
2018-06-04 15:37:35 +01:00
Joe Thornber
232918fb86 build: libbase.a 2018-06-04 13:53:07 +01:00
Joe Thornber
29abba3785 build: get separate builddir working again 2018-06-04 13:22:14 +01:00
Joe Thornber
66b10275c5 build: More tweaks to python include dirs. 2018-06-04 12:28:17 +01:00
Joe Thornber
f6eeb218b2 Merge branch 'master' of git+ssh://sourceware.org/git/lvm2 2018-06-04 11:59:49 +01:00
Joe Thornber
891f8dc19d build: Get python dir building without the include/ dir 2018-06-04 11:59:13 +01:00
Zdenek Kabelac
1140d70893 build: fixes 2018-06-04 12:28:13 +02:00
Zdenek Kabelac
eebf070d32 build: remove any leftover file
In case repository is used after building older version of lvm2
(i.e. git bisect) make sure clean erases any possible old symlinks.
2018-06-04 12:26:38 +02:00
Joe Thornber
21a5be2364 build: link lvm2_activation_generator_systemd_red_hat with libdevice-mapper.a 2018-06-04 10:00:44 +01:00
Zdenek Kabelac
6a1f458bb7 build: compile fixes 2018-06-01 21:12:31 +02:00
Joe Thornber
4d19321fd3 Merge branch 'master' of git+ssh://sourceware.org/git/lvm2 2018-06-01 19:19:11 +01:00
Joe Thornber
02c4901d89 build: get clvmd building again 2018-06-01 19:18:36 +01:00
David Teigland
7b5b1a9b6f scan: clean exit for alloc failure 2018-06-01 13:15:22 -05:00
David Teigland
0625c7f372 devs: clear coverity warning about null info
a theoretical possibility.
2018-06-01 13:15:22 -05:00
David Teigland
09177b53dd lvmlockd: clarify lock_type use for coverity
Make it clearer when vg->lock_type will be used so
coverity doesn't worry about it.
2018-06-01 13:15:22 -05:00
David Teigland
b6f0f20da2 lvmlockd: primarily use vg_is_shared
to check if a vg uses an lvmlockd lock_type,
instead of the equivalent but longer is_lockd_type.
2018-06-01 13:15:22 -05:00
Joe Thornber
c4497ee9e8 build: Link with -lrt
Needed for older version of glibc
2018-06-01 17:20:48 +01:00
Joe Thornber
15a8142f6d build: make sure selinux, udev and blkid libraries are linked.
Fixes breakage from the recent libdm split.  Though these didn't
ever appear to be linked (could they have piggy backed from libdevmapper.so
being linked to them?).
2018-06-01 16:53:20 +01:00
Joe Thornber
dbba1e9b93 Merge branch 'master' into 2018-05-11-fork-libdm 2018-06-01 13:04:12 +01:00
Joe Thornber
cb379c86c4 Merge branch '2018-05-30-bcache-radix-tree' 2018-06-01 12:45:33 +01:00
David Teigland
81f07c3cca man lvmlockd: update list of limitations 2018-05-31 16:38:39 -05:00
David Teigland
885eb2024f tests: enable non-working tests with lvmlockd
Those that are failing for reasons other than lvmlockd
restrictions.
2018-05-31 16:18:53 -05:00
David Teigland
00f6a8466e tests: enable more working tests with lvmlockd 2018-05-31 16:13:58 -05:00
David Teigland
06b2e5c176 lvmlockd: improve error message for existing lockspace
When a VG/lockspace already exists with the same name
don't just print the error number.
2018-05-31 15:52:23 -05:00
David Teigland
caa600a409 tests: enable lvcreate-pvtags with lvmlockd 2018-05-31 15:37:25 -05:00
David Teigland
b9c1cef817 lvmlockd: fix reverting new lv in error path
The wrong name was being used to free the LV lock
in lvmlockd in the error exit path.
2018-05-31 15:35:48 -05:00
David Teigland
4a01e4f389 tests: enable metadata-balance with lvmlockd 2018-05-31 15:12:34 -05:00
David Teigland
08771bbbbf tests: enable lvmlockd with tests using lvcreate -H -L LV 2018-05-31 14:49:16 -05:00
David Teigland
8d9d32b315 lvmlockd: enable lvcreate -H -L LV
Allow this command in a shared VG which had previously been
disallowed.
2018-05-31 14:20:11 -05:00
Joe Thornber
d4d39d0f90 Merge branch 'master' into 2018-05-30-bcache-radix-tree 2018-05-31 16:36:04 +01:00
David Teigland
fdaa7e2e87 vgs: add report field for shared
equivalent to a non-empty -o locktype.
2018-05-31 10:23:03 -05:00
David Teigland
2beb3009bd tests: change lvcreate syntax to allow lvmlockd
Using the less ambiguous lvcreate syntax for creating a
cache LV allows more tests to run with lvmlockd.
2018-05-30 16:40:03 -05:00
David Teigland
214235367b tests: enable lvcreate cache tests with lvmlockd
Tests that want to use lvcreate to create a new
origin LV and then combine it with an existing
cache pool to create a cache LV.
2018-05-30 15:56:08 -05:00
David Teigland
c516321325 lvmlockd: enable lvcreate of new LV plus existing cache pool
In this command, lvcreate creates a new LV and then combines
it with an existing cache pool, producing a cache LV.  This
command was previously not allowed in in a shared VG.
2018-05-30 15:24:24 -05:00