1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

15416 Commits

Author SHA1 Message Date
David Teigland
ed799404f8 doc: add some performance info 2018-05-15 15:17:36 -05:00
David Teigland
3bbc17a670 scan: use up to 1024 max bcache blocks
Create bcache with one block per device that
will be scanned up to 1024 max blocks.
2018-05-15 15:17:31 -05:00
Zdenek Kabelac
fb0aca86f8 lvmapp: do not unlock not locked VGs
After recent changes this seems to give some help, explore more...
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
99cd7108d3 tests: better check for python libpath
Find also python3 lvm.so name.

And ATM just run a single test, otherwise we get too many cores.
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
f8745dc23e python: specify libdm path for linking 2018-05-15 22:02:41 +02:00
Zdenek Kabelac
550380c1a4 tests: aux fixes
Properly check for kernel version.
Also detect sysfs throttling support.
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
3b3ee66b1f tests: time limit waiting on lvmetad kill 2018-05-15 22:02:41 +02:00
Zdenek Kabelac
b5da4fdfce tests: drop junk 2018-05-15 22:02:41 +02:00
Zdenek Kabelac
be154e30e8 tests: move into generated file
Since python path is evaluated and we cannot use anymore /usr/bin/env
switch to generated file.
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
ad756bb708 build: configure detect libaio
No point to start building lvm without this header file.

Although there could be 'some point' in supporting standalone build
of 'just' libdm  where the libaio might be avoided.

TODO: think about configure option for building libdm only.
2018-05-15 22:02:41 +02:00
David Teigland
c1abcee142 WHATS_NEW: updates 2018-05-15 10:49:06 -05:00
Zdenek Kabelac
889558fedb conf: update conf
Matching patch 2eba7c7755
2018-05-15 16:58:28 +02:00
Zdenek Kabelac
d25c135806 tests: fix size of COW
Needs to be changed to match 4K extent_size.
2018-05-15 16:49:53 +02:00
Zdenek Kabelac
0217c53b24 tests: dont try to use DAX based brd device
Unfortunatelly on kernels <4.16 lvm2 can't user brd ramdisks
for backend device as number of test is failing with this kernel
message:

device-mapper: ioctl: can't change device type after initial table load.

caused by DAX request-based handling, and lvm2 tries to replace device
with backend 'error' bio-based device and such table reload is being
rejected.

So ATM keep ramdisk only on most recent kernel to experiment a bit,
for older machines just stay safe and keep old slower loop backend.
2018-05-15 16:07:13 +02:00
Jonathan Brassow
2eba7c7755 clean-up: example.conf.in typo 2018-05-14 16:17:01 -05:00
David Teigland
11ceb77867 lvmcache: fix loop freeing infos
valgrind was concerned about loop through vginfo->infos,
so grab info from dev.
2018-05-14 13:45:55 -05:00
David Teigland
517d6cc418 scan: add some missing frees
some objects had been moved out of mem pools.
2018-05-14 13:38:16 -05:00
Zdenek Kabelac
0e56fa6892 tests: old systems do not have even throttling
When even throttling is not available, skip or use  should
with particular test piece.
2018-05-12 23:37:30 +02:00
Zdenek Kabelac
0a5edc1f12 tests: swith to mkstemp
As mkostemp is only on newer systems, switch to more old version
which effectively does exactly the same thing for given list of
open flags.
2018-05-12 23:23:54 +02:00
Zdenek Kabelac
9640320aea tests: start to use 4k mkfs
While newer system can detect need for 4K mkfs, on older test machines
running test suite over 4k is reporting problems.
Some more generic solution is needed thought.
2018-05-12 23:22:20 +02:00
Zdenek Kabelac
ca87674ea4 tests: fix check sysfs
Commit 810f856c24 missed to move
assign of P after setting maj & min.
2018-05-12 23:01:52 +02:00
Zdenek Kabelac
edede1d20f tests: do not try to create 1K extents 2018-05-12 22:52:41 +02:00
Zdenek Kabelac
093428b067 tests: restore functionality
Forgotten revert of tracing patch. Restoring previous functinality.
2018-05-12 22:51:43 +02:00
Zdenek Kabelac
7b8b13c62b tests: aux detecs supported segments
Replace previous compilation detection of present supported segtypes
with runtime check.
2018-05-12 22:50:36 +02:00
Zdenek Kabelac
35ffc3f8eb build: lcov reporting for unit tests
List also lcov for processed unit tests.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
67c02877a1 build: install unit-test 2018-05-12 18:18:23 +02:00
Zdenek Kabelac
4c7565b65d tests: add unit-test
Allow unit-test to be run as part of standard 'make check'.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
fa8d0b5766 tests: detect running bcache test on tmpfs
When test happens to run in tmpfs, it cannot use O_DIRECT (unsupported
with tmpfs).

CHECKME: unsure if detection of tmpfs is 'valid' but kind of works and
is very simple.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
79b2961399 build: rename device-mapper to device_mapper
As Makefiles already do use target with name 'device-mapper'
rename this new device-mapper dir to non-conflicting name.
We also seem to already use '_' in other dir names.

Also rename device_mapper/Makefile to source for generating Makefile.in
so we can use it for build in other source dirs properly.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
e2c766d37e build: fix build rules for srcdir
It's very hard to use some 'non-recurive' Makefiles with
rest of system running 'recursively'.

So ATM drop inclusion of subdir makefile and add support
for 2 new top-level targets:

unit-test  (builds test/unit dir)
run-unit-test (build & run test/unit/unit-test run)
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
ac768a9d2b bcache: do not use libdm header files
Logging for libdm differs from lvm logging - keep using consisten
logging function calls.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
83e362cd32 build: make generate 2018-05-12 18:18:23 +02:00
Zdenek Kabelac
0b465d1543 tests: drop cache checking
Just like 52656c89fd
when now cache is compiled in 'unditionally'.

This patch is actually enforce by changes in
commit: 2bc896f2a3
where CACHE value is not set anymore.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
d38a2d64f0 tests: add support to run unit test 2018-05-12 18:18:23 +02:00
Zdenek Kabelac
7616a7f46e build: properly track source file for lmvlockctl
Ensure the source file is tracked by various cleanup functions.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
cbe81a0b05 tests: inittest may run without root
If the test does not need root, it can use 'SKIP_ROOT_DM_CHECK'.

For such test no actions needed root to initilize DM devices and
nodes will be take and test can check i.e. functional unit tests.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
0221ebfd64 tests: inittest compare string
Avoid logging warning when compared string is empty with -eq.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
a7a23e7dd2 tests: aux extra protection for rm -rf 2018-05-12 18:05:50 +02:00
Zdenek Kabelac
38b4354494 tests: again disable this raid test
Still kills testing machines even with 4.17-rc4 kernels
on reshaping.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
ec0f5c2bf6 tests: drop delaying
Here seem delaying dev has no use.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
86c8f0f01f tests: using throttling 2018-05-12 17:48:31 +02:00
Zdenek Kabelac
7362ed68be tests: move device discard 2018-05-12 17:48:31 +02:00
Zdenek Kabelac
f5da325d70 tests: use throttle_dm_mirror
In this case it's better to use throttling of mirror sync,
that delay everything with dm_delay.
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
172d8fb355 tests: aux support throttling of dm mirror
Usage of dm_delay looks to be slowing not just 'delayed' portion
of device, but due to the fact it's also slows down ANY flush
operation on such device it's overal speed impact is huge.

In some case we can however user other methods to slowdown disk writes,
in case of old dm 'mirror'  target we can throttle  I/O of mirror
synchronisation giving the next commands enough time to test couple
race conditions.

Usage:

throttle_dm_mirror [percentage]

Thtrottle down sync speed (lowest is '1' which is also default when
unspecified)

restore_dm_mirror

Restores the value of throttling before call of  'throttle_dm_mirror'
Usually it should '100'
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
0cadfdd69d tests: try running tests over ramdisk
Currently usage of loop device over backend file in ramdisk (tmpfs)
is actually causing unnecassary memory consution, since just
reading such loop device is causing RAM provisioning.

This patch add another possible way how to use ramdisk directly
through 'brd' device when possible (and allowed).

This however has it's limitation as well -  brd does not support
TRIM, so the only way how to erase is to remove brd module ??

Alse there is 4K sector size limitation imposed by ramdisk.

Anyway - for some mirror test that were using large amount of
disk space (tens of MB) this brings noticable speed boost.
(But could be worth to solve the slowness of loop in kernel?)

To prevent using 'brd' for testing set LVM_TEST_PREFER_BRD=0
like this:

make check_local LVM_TEST_PREFER_BRD=0
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
842b3074b7 tests: crypt test cannot run on ramdisk
This test can't use brd (ramdisk) as backend since for some
weird reason  lsblk is not listing these device.

TODO: test could be probably rewritten to avoid using lsblk somehow??
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
6f48741062 tests: happy using of 4K backend devices
When the backend device supports only 4K blocks (like ramdisk)
we cannot use for testing any smaller blocksize.

So recalc test for 4K extent size.

We may possibly introduce one list extra test that
can be executed on devices with 512b sectors to
check lvm2 support those min extent sizes...
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
e2be14e2d5 tests: raise min size for XFS
Seems XFS now requires at least 1605 blocks.
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
6740c78e83 poll: add stdout fflush after poll query
ATM it's a bit ugly to enforce flushing of 'stdio' here, but works as quick
hot-fix.

log_print*() is using buffered I/O.

But for pooling with typical 1s interval this may take a while before
buffer about continues progress gets flushed.
So ATM fflush().

TODO: either add  log_print*_with_flush() or maybe directly use just
line buffering with log_print() and only log_debug() keep using buffered
I/O mode.
2018-05-12 11:30:05 +02:00
David Teigland
09fcc8eaa8 scan: ignore duplicates that are md component devs
md devices using an older superblock version have
superblocks at the end of the md device.  For commands
that skip reading the end of devices during filtering,
the md component devs will be scanned, and will appear
as duplicate PVs to the original md device.  Remove
these md components from the list of unused duplicate
devices, so they are treated as if they had been
ignored during filtering.  This avoids the restrictions
that are placed on using PVs with duplicates.
2018-05-11 15:52:22 -05:00