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

2287 Commits

Author SHA1 Message Date
Joe Thornber
7f97c7ea9a build: Don't generate symlinks in include/ dir
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
2018-05-14 10:30:20 +01:00
Joe Thornber
413488edc6 radix-tree: fix a function decl 2018-05-11 11:40:47 +01:00
Joe Thornber
576dd1fc41 radix-tree: First drop of radix tree.
An implementation of an adaptive radix tree.  Has the following nice
properties:

  - At least as fast as the hash table
  - Uses less memory
  - You don't need to give an expected size when you create
  - It scales nicely (ie. no large reallocations like the hash table).
  - You can iterate the keys in lexicographical order.

Only insert and lookup are implemented so far.  Plus there's a lot
more performance to come.
2018-05-11 06:10:01 +01:00
Joe Thornber
3c0f5bdd08 functional-tests/vdo: fix mem leak in test 2018-05-10 14:31:16 +01:00
Joe Thornber
ae50374811 bcache: Add sync io engine
Something to fall back to when testing.
2018-05-10 14:29:26 +01:00
Joe Thornber
67b80e2d9d bcache: knock out err param.
Dave used this for debugging.  Not needed in general.
2018-05-10 13:26:08 +01:00
Joe Thornber
2ae4a04710 vdo status: Unit tests + fix bugs 2018-05-10 13:01:26 +01:00
Joe Thornber
3600caa71d Merge branch 'master' of git+ssh://sourceware.org/git/lvm2 2018-05-09 11:07:24 +01:00
Joe Thornber
1c5c99afce bcache-utils: bcache_set_bytes() 2018-05-09 11:05:29 +01:00
Joe Thornber
2e1869b923 unit-test/bcache-utils: Tweak zero tests 2018-05-09 10:50:31 +01:00
Heinz Mauelshagen
c9729022bf tests: bump raid target version in reshape tests
Adjust to target version allowing tests to succeed.
2018-05-04 16:58:11 +02:00
Heinz Mauelshagen
8bf92875f7 tests: don't rely on cache target in component-raid.sh
Lead to unnecessary skips of the test.
2018-05-04 16:54:01 +02:00
Joe Thornber
49db9b5e0b Merge branch '2018-05-03-improve-bcache-utils' 2018-05-03 20:15:13 +01:00
Joe Thornber
ac18164a52 unit-test: a bunch of tests for bcache-utils 2018-05-03 20:13:13 +01:00
Heinz Mauelshagen
4ebfd8e8eb lvconvert: don't return success on degraded -m raid1 conversion
In case "lvconvert -mN RaidLV" was used on a degraded
raid1 LV, success was returned instead of an error.

Provide message to inform about the need to repair first
before changing number of mirrors and exit with error.

Add new lvconvert-m-raid1-degraded.sh test.

Resolves: rhbz1573960
2018-05-03 18:48:00 +02:00
Joe Thornber
52656c89fd functional tests: Update have_raid function
No need to check if it's built in.
2018-05-03 14:22:24 +01:00
Joe Thornber
9fe0be871c unit-test/matcher_t: Fixup Kabi's test
The matcher matches the regexes in reverse order.
2018-05-02 13:53:43 +01:00
Joe Thornber
506ab29bfd unit-test/matcher_t: add another (failing!) test for Kabi 2018-05-02 13:31:57 +01:00
David Teigland
11436b00e0 tests: add gfs-pool test
Put back a test like the old one that was removed
in d709d8445f.

It verifies that lvm will ignore and not use a
gfs-pool device.
2018-05-01 15:24:42 -05:00
David Teigland
39f05855c0 tests: remove use of lvm1 metadatatype 2018-05-01 13:29:57 -05:00
David Teigland
d709d8445f tests: remove gfs pool test 2018-05-01 13:25:40 -05:00
David Teigland
9687ee2a74 tests: update lvmetad-disabled to not use lvm1 2018-05-01 11:33:39 -05:00
Joe Thornber
3ea862bdfc unit-test/bcache_t: test was using too large a block size 2018-05-01 14:17:12 +01:00
Joe Thornber
de042fa13d unit-test/bcache_t: Use a stripped down fixture for some tests 2018-05-01 12:54:57 +01:00
Joe Thornber
f564e78d98 bcache: rewrite bcache_{write,zero}_bytes
These are utility functions so should only use the public interface.

Also write_bytes was flushing, which will kill performance.
2018-05-01 12:07:33 +01:00
Joe Thornber
c863c9581d Merge branch 'master' of git+ssh://sourceware.org/git/lvm2 2018-05-01 10:48:42 +01:00
Joe Thornber
7aba7fe68b unit-test/io_engine_t: add a little test for bcache_{read,write}_bytes 2018-05-01 10:47:40 +01:00
Joe Thornber
f6459757af unit-test/bcache_t: fixup a test.
Problem found with valgrind.
2018-05-01 09:17:55 +01:00
David Teigland
c1cd18f21e Remove lvm1 and pool disk formats
There are likely more bits of code that can be removed,
e.g. lvm1/pool-specific bits of code that were identified
using FMT flags.

The vgconvert command can likely be reduced further.

The lvm1-specific config settings should probably have
some other fields set for proper deprecation.
2018-04-30 16:55:02 -05:00
David Teigland
c365d7de4f tests: fix THIN built-in check 2018-04-30 13:12:17 -05:00
Joe Thornber
39f24a169c unit-test/io_engine_t: Improve the read test.
Now verifies what it reads.
2018-04-30 17:09:24 +01:00
Joe Thornber
ef79d639fe unit-test/io_engine_t: use posix_memalign() rather than aligned_alloc()
Not present on older systems.
2018-04-30 16:55:19 +01:00
Joe Thornber
2bc896f2a3 build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure
It now behaves as if the were all set as 'internal'
2018-04-30 10:11:23 +01:00
Zdenek Kabelac
b904d6653d tests: add also snapshot monitoring 2018-04-30 10:41:51 +02:00
Zdenek Kabelac
dd7ac793a0 aux: enhance teardown to better handle weird names
When 'dmsetup' reports result with --nameprefixes it currently
incorrectly 'escapes' problematic characters.

Letting pass such string though shell 'eval' function is hard task.
So instead cut away substring.

Once dmsetup will start to properly escape backslash and apostrophe
this function may need further tuning.
2018-04-30 10:41:51 +02:00
David Teigland
138225a3a8 test: remove pv-duplicate
This wasn't testing duplicate PVs, which are tested by
process-each-duplicate-pvs.sh.
2018-04-27 16:25:41 -05:00
Joe Thornber
ab63923d19 unit-tests: Move to test/unit 2018-04-27 16:55:07 +01:00
Joe Thornber
ea34dad66f [unit-test] Push the new unit test framwork.
See doc/unit-test.txt for details.

Some bcache tests failing.  Probably due to dct changing semantics, will
fix in follow up patch.
2018-04-26 11:59:39 +01:00
Zdenek Kabelac
dcb5434a7f tests: more zero usage
Another case where usage of zero backend for mirror legs is more
effective then using delayed_dev.
2018-04-23 22:42:18 +02:00
Zdenek Kabelac
fc3ed8856f tests: update testing to not use delay dev
Instead of using delayer device user 'zero' device and let mirror
do some real work which takes some time.

In case the test machine is too fast - mirror might need to be made bigger
to meet needed criteria.

Also move all test needed this 'zero' PV trick to the end of test
so  $dev2  and $dev4 are covered with 'zero' and can take any amount of
write without consuming any real space.
2018-04-23 22:42:18 +02:00
David Teigland
aee27dc7ba scan: skip device rescan in vg_read
For reporting commands (pvs,vgs,lvs,pvdisplay,vgdisplay,lvdisplay)
we do not need to repeat the label scan of devices in vg_read if
they all had matching metadata in the initial label scan.  The
data read by label scan can just be reused for the vg_read.
This cuts the amount of device i/o in half, from two reads of
each device to one.  We have to be careful to avoid repairing
the VG if we've skipped rescanning.  (The VG repair code is very
poor, and will be redone soon.)
2018-04-20 11:23:14 -05:00
David Teigland
a01a8d7172 tests: vgck now exits with error for bad vg 2018-04-20 11:22:48 -05:00
David Teigland
ae093df3f1 test: vgsplit-usage if LVM1 tests 2018-04-20 11:22:46 -05:00
David Teigland
d75aa55784 disable LVM1 tests 2018-04-20 11:22:46 -05:00
Joe Thornber
dc8034f5eb [device/bcache] more work on bcache 2018-04-20 11:12:50 -05:00
Joe Thornber
1cde30eba0 [device/bcache] More fiddling with tests 2018-04-20 11:12:50 -05:00
Joe Thornber
467adfa082 [device/bcache] More tests and some bug fixes 2018-04-20 11:12:50 -05:00
Joe Thornber
8ae3b244fc [build] include test/unit/Makefile rather than recursive build
FIXME: unit tests are not currently run as part of make check.
2018-04-20 11:12:50 -05:00
Joe Thornber
b03e55a513 [device/bcache] rename a unit test 2018-04-20 11:12:50 -05:00
Joe Thornber
0d0fab3d2d [device/bcache] another unit test 2018-04-20 11:12:50 -05:00