David Teigland
aecf542126
metadata: prevent writing beyond metadata area
...
lvm uses a bcache block size of 128K. A bcache block
at the end of the metadata area will overlap the PEs
from which LVs are allocated. How much depends on
alignments. When lvm reads and writes one of these
bcache blocks to update VG metadata, it can also be
reading and writing PEs that belong to an LV.
If these overlapping PEs are being written to by the
LV user (e.g. filesystem) at the same time that lvm
is modifying VG metadata in the overlapping bcache
block, then the user's updates to the PEs can be lost.
This patch is a quick hack to prevent lvm from writing
past the end of the metadata area.
2018-10-29 16:53:17 -05:00
Heinz Mauelshagen
8df2dd66ce
Revert "raid: fix left behind SubLVs"
...
This reverts commit 16ae968d24
.
We need to come up with a better fix, because we fall short
wiping all known signatures when not using the wipe_lv API.
2018-10-25 14:35:56 +02:00
Heinz Mauelshagen
16ae968d24
raid: fix left behind SubLVs
...
lvm metadata writes, commits and activations are performed
for (newly) allocated RAID metadata SubLVs to wipe any preexisiting
data thus avoid false raid superblock positives on RaidLV activation.
This process can be interrupted by command or system crashs
thus leaving stale SubLVs in the lvm metadata as a problem.
Because we hold an exclusive lock in this metadata SubLV wiping
process, we can address this problem by avoiding aforementioned
commits/writes/activations altogether wiping the respective first
sector of the first physical extent allocated to any metadata SubLV
directly via the existing dev_set() API.
Succeeds all LVM RAID tests.
Related: rhbz1633167
2018-10-24 16:35:30 +02:00
Marian Csontos
fc35a9169e
spec: lvmdbusd requires python3 setuptools
2018-10-22 12:51:51 +02:00
David Teigland
7498f83833
tests: add new test for lvm on md devices
2018-10-18 13:06:42 -05:00
Zdenek Kabelac
9e1ee07d69
tests: missed char in list
...
'=' also doesn't belong to property name.
2018-10-17 10:41:25 +02:00
Zdenek Kabelac
015231b11f
tests: better support for /var/run
2018-10-16 23:49:35 +02:00
Zdenek Kabelac
32f1afbe36
tests: add raid target presence check
2018-10-16 23:49:35 +02:00
Zdenek Kabelac
69bebfd958
tests: fix conf generation with older shells
...
For shells without array support, fix selecting bug,
and require keyword to end with some 'space' char,
so 'scan' is not matched with 'scan_var'.
2018-10-16 23:49:35 +02:00
Zdenek Kabelac
f1ac72c848
tests: properly enforce v1
...
Since with smq policy we can still pick format v2 - enforce
format v1 explicitely.
2018-10-16 21:56:00 +02:00
Zdenek Kabelac
4db228b907
tests: timing without /usr/bin/time
...
Use just 'date' so the 'time' package doesn't need to be installed
just for this purpose.
2018-10-16 21:56:00 +02:00
Zdenek Kabelac
c15ac326cc
tests: fix tested targeted
...
Fix cut&paste bug.
2018-10-16 21:56:00 +02:00
Zdenek Kabelac
05b5774827
cov: shutdown warning
...
Since previous patch reverted coverity patch as this case is intentional,
provide override this coverity warning.
2018-10-16 21:55:19 +02:00
Zdenek Kabelac
6179cab877
revert "cov: dm stats missed terminating null"
...
This reverts commit 20971f7034
as the parsing of 'dmstatus' started to fail on present \0 char.
2018-10-16 21:34:23 +02:00
David Teigland
2217d6396a
fix: cov: missed return value test
...
use the existing error paths
2018-10-15 11:53:28 -05:00
Zdenek Kabelac
06a4a356db
cov: avoid selfrecursive inclusion of toolcontext.h
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
fdd76da33d
cov: drop uneeded header files
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
c4f39decc8
cov: pvscan ensure sigle_devs list is always initialized
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
43e4bfe428
cov: ignore error of vsnprintf
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
84f00f5058
cov: add missing error path check for label_scan_open
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
b57e73a0f1
cov: make sure label scans valid lvinfo
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
70950bbd97
cov: log failing unlink
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
f1ac130dc1
cov: check closedir result
...
Log problems around failing closedir().
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
668c9d0762
cov: check dm_strncpy result
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
b1ff52ca14
cov: check dev_close_immediate
...
Function can report log_error() on fail path.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
2513661467
cov: ensure vars are set
...
Make sure, tmp_begin and tmp_end are always set, even for blind
coverity.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
cbbdace006
cov: dm node message fix missing initilization
...
In 2 teoretical error path the 'r' value has not been set to
proper value before possible use in error path.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
253989ecd9
cov: fix error path
...
Avoid calling 'bad:' section since we have not set 'fd' yet
and instead directly return failing 0 value.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
13c49033ed
cov: fix failing filter initialization
...
When persistent_filter_create() fails, the existing passed filter
should be preserved, so it could be properly deleted on
error path - so new pfilter is assigned instead.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
a7298810d1
cov: fix typo
...
Avoid double assing same value.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
eb566e034f
cov: add check for positive value
...
As pgsize parameter for _init_free_list() can't be negative,
report problem in case for any reason we would get negative number.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
9b71212262
cov: dmstats check for failing malloc
...
Add missing check for allocation success.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
30b1b57506
cov: add at least ASSERT
...
Seems lot of code here can't handle failing allocation.
Meanwhile before bigger fix put in asserts in place.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
eed8715e1d
cov: fix missing null allocation check
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
20971f7034
cov: dm stats missed terminating null
...
Coverity noticed allocating insufficient memory
for the terminating null of the string.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
77aa055e8a
cov: index off by one
...
Basically apply stable patch fdb6ef8a85
to internal libdm version.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
2ab784440a
cov: fix leaking openned file descriptors
...
Once the FD is no longer needed, close it.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
9b85ecb85b
cov: fix memleak on bcache io error path
...
Drop allocated IO.
merge free bache
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
3222924c3d
cov: dmeventd plugin fix memleak
...
Fix memory leak when policy command fails too frequently and
plugin decided to skip it.
2018-10-15 17:49:22 +02:00
Zdenek Kabelac
fbfbbf6d6a
cov: drop check for pointer
...
Pointer must be always set and it's been already dereferenced.
2018-10-15 14:24:28 +02:00
Zdenek Kabelac
1bb30a8c27
cov: warn about failing sigaction
2018-10-15 14:24:28 +02:00
Zdenek Kabelac
5811fa33bb
cov: missed return value test
...
Check validity of read.
2018-10-15 14:24:28 +02:00
Marian Csontos
954b885a08
build: make genrate config file
2018-10-11 11:06:23 +02:00
Marian Csontos
48768cc5be
config: Fix version for VDO
2018-10-11 11:06:23 +02:00
Marian Csontos
6462e8dffc
build: Use PYTHON env. variable when provided
2018-10-10 13:27:16 +02:00
Marian Csontos
9ed869cce1
post-release
2018-10-10 13:27:16 +02:00
Marian Csontos
f8462cff92
pre-release
2018-10-10 11:26:53 +02:00
Marian Csontos
37366ec3b0
build: gcc can be fussy about order of libs
2018-10-10 11:25:50 +02:00
Marian Csontos
6e12a33292
build: make generate
2018-10-10 11:25:50 +02:00
Zdenek Kabelac
5c36ad06a1
tests: check activation of many thin-pool
...
Artifitical testing of monitoring of many thin-pools with low number
of resources in use (need only few pools to actually hit the race).
2018-10-10 09:54:08 +02:00