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

15841 Commits

Author SHA1 Message Date
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
Zdenek Kabelac
194eccf925 dmeventd: lvm2 plugin uses envvar registry
Thin plugin started to use configuble setting to allow to configure
usage of external scripts - however to read this value it needed to
execute internal command as dmeventd itself has no access to lvm.conf
and the API for dmeventd plugin has been kept stable.

The call of command itself was not normally 'a big issue' until users
started to use higher number of monitored LVs and execution of command
got stuck because other monitored resource already started to execute
some other lvm2 command and become blocked waiting on VG lock.

This scenario revealed necesity to somehow avoid calling lvm2 command
during resource registration - but this requires bigger changes - so
meanwhile this patch tries to minimize the possibility to hit this race
by obtaining any configurable setting just once - such patch is small
and covers majority of problem - yet better solution needs to be
introduced likely with bigger rework of dmeventd.

TODO: avoid blocking registration of resource with execution of lvm2
commands since those can get stuck waiting on mutexes.
2018-10-10 09:54:07 +02:00
Marian Csontos
11d4e63888 spec: No %ghost for dirs at tmpfiles.d
%ghost should not be used for directories created by systemd-tmpfiles.

This may prevent package from working right after installation without
invoking systemd-tmpfiles.

See: https://pagure.io/packaging-committee/issue/439
2018-10-03 20:05:37 +02:00
David Teigland
a49f494c4d metadata: clarify comments about max size
Since there is now a direct limit of half the space.
2018-09-24 15:27:03 -05:00
David Teigland
6be1efd13d metadata: add direct size limit
Previously the size was limited by checking if the
old and new copies of the metadata overlapped.
This generally limited the size to about half of
the total space, but it could be larger given the
size differences between old and new.  Now add a
direct check to limit the size to half the space.
2018-09-24 14:41:58 -05:00
David Teigland
91c7e66f2b metadata: remove incorrect comment about alignment 2018-09-20 15:38:09 -05:00
David Teigland
09131e3922 metadata: add comment about negative impact of rounding 2018-09-20 14:15:49 -05:00
David Teigland
30c94b0324 metadata: remove an unused and incorrect overflow check
Remove another instance of an invalid check for metadata
overflow during read.  The previous instance was removed
in commit 5fb15b193.

This was checking for metadata that that overflowed the
circular disk metadata buffer during read, but such metadata
cannot be written, so it shouldn't be possible to find see.
Also, the check was incorrect and could trigger when there
was no overflow.
2018-09-20 13:53:50 -05:00
Joe Thornber
8424655af9 Merge branch '2018-09-13-radix-tree-bug' 2018-09-20 14:43:51 +01:00
Joe Thornber
bda4f3a7ae [build] switch back to the adaptive radix tree 2018-09-20 14:40:28 +01:00
Joe Thornber
ba6d8a3195 [unit-test/radix-tree] Add a huge test case
Derived from the logs that dct gave me.
2018-09-20 14:38:34 +01:00
Joe Thornber
bb17302084 [radix-tree] tidy up _degrade_to_n48
Shouldn't be any functional changes.
2018-09-20 14:28:47 +01:00
Joe Thornber
ebd2d7773f [radix-tree] Fix bug in _degrade_to_n16
Values were getting shuffled
2018-09-20 14:20:16 +01:00