]>
sourceware.org Git - lvm2.git/log
Zdenek Kabelac [Fri, 18 Sep 2020 12:23:20 +0000 (14:23 +0200)]
tests: aux better handle invalid table
In cases where internal functions like zero_dev, delay_dev pass-in
invalid parameter so resulting table can't work, resume at least
previous table line before failing out - so the cleaning process
later on is not stuck waiting on a suspended device.
Zdenek Kabelac [Thu, 17 Sep 2020 22:31:59 +0000 (00:31 +0200)]
tests: also use sed to shorten log output
Zdenek Kabelac [Thu, 17 Sep 2020 22:31:11 +0000 (00:31 +0200)]
tests: resolve missing removal of loopdevice on error path
In case of test failure, loop device leaked and occupied space forever.
Zdenek Kabelac [Thu, 17 Sep 2020 21:26:03 +0000 (23:26 +0200)]
tests: bigger data still needed for 0.7.0
Zdenek Kabelac [Thu, 17 Sep 2020 21:25:23 +0000 (23:25 +0200)]
tests: lower memory usage
Reduce memory needed by test at one time.
David Teigland [Wed, 16 Sep 2020 20:14:51 +0000 (15:14 -0500)]
configure: enable integrity by default
David Teigland [Wed, 16 Sep 2020 19:46:50 +0000 (14:46 -0500)]
hints: enhance debug messages
David Teigland [Wed, 16 Sep 2020 18:54:16 +0000 (13:54 -0500)]
label: cleanup set_byte error exit
David Teigland [Wed, 16 Sep 2020 18:47:06 +0000 (13:47 -0500)]
Revert "label: use formaters FMTu64 and FMTsize_t"
This reverts commit
d0ccb2521ba4f34455078f87f46cc41f5761ffc0 .
Zdenek Kabelac [Wed, 16 Sep 2020 11:21:16 +0000 (13:21 +0200)]
tests: smaller delay and lowered version
See if this will still work. Some boxes are delayed too much.
Also try to check for raid extend progress from version 1.13.
Zdenek Kabelac [Wed, 16 Sep 2020 11:12:17 +0000 (13:12 +0200)]
tests: fix bash regex syntax
Typo before last commit.
Zdenek Kabelac [Mon, 14 Sep 2020 19:25:04 +0000 (21:25 +0200)]
tests: switch for checking version of installed tools
It looks like older tools were compacting metadata more.
Zdenek Kabelac [Mon, 14 Sep 2020 19:23:16 +0000 (21:23 +0200)]
tests: skip kernel for this test
Kills this kernel ATM
Zdenek Kabelac [Tue, 15 Sep 2020 19:47:39 +0000 (21:47 +0200)]
label: use formaters FMTu64 and FMTsize_t
Produces code without casts to differntly signed types
and also shortens and enhances readbility.
Zdenek Kabelac [Tue, 15 Sep 2020 18:35:48 +0000 (20:35 +0200)]
wipe: dev_set_bytes resolves zeroing
Since dev_write_zeros() is just subset of dev_set_bytes()
use it directly and simplify code.
Zdenek Kabelac [Tue, 15 Sep 2020 14:40:53 +0000 (16:40 +0200)]
wipe: convert zero_value to uint8_t
We always write this value as byte.
Zdenek Kabelac [Tue, 15 Sep 2020 14:38:50 +0000 (16:38 +0200)]
wipe: zeroing of 8 sectors is granted
With do_zero min is always 8 sectors, so use 0 as default.
Zdenek Kabelac [Tue, 15 Sep 2020 14:29:12 +0000 (16:29 +0200)]
label: deduplicate dev_set_bytes
As dev_write_zeros() is same as dev_set_bytes() reused the code
directly.
Zdenek Kabelac [Tue, 15 Sep 2020 14:20:16 +0000 (16:20 +0200)]
label: code deduplication
Zdenek Kabelac [Tue, 15 Sep 2020 19:33:30 +0000 (21:33 +0200)]
hints: enhance debug with log_sys_debug
Zdenek Kabelac [Tue, 15 Sep 2020 20:45:49 +0000 (22:45 +0200)]
lvcreate: change error message
Provide more useful error message.
Zdenek Kabelac [Fri, 4 Sep 2020 16:08:59 +0000 (18:08 +0200)]
lvcreate: add extra synchronization at error path
Put explict udev synchronization before we try to deactive devices.
Zdenek Kabelac [Sat, 12 Sep 2020 17:08:24 +0000 (19:08 +0200)]
tests: protect this test for another kernel
Thisi 3.10.0-862 kernel also dies with this test.
Zdenek Kabelac [Sat, 12 Sep 2020 17:06:05 +0000 (19:06 +0200)]
tests: tune usage of smaller metadata
While the previous commit
c9b40083fc34b5e2a1bfc7b251b38c0b8737483f
decresed version to 1.19 for using bigger datasets, it's not
been quite right - so from our bb machine it looks like
bigger metadata consumption started with 1.19 and kernel 4.18
(fc27)
Zdenek Kabelac [Sat, 12 Sep 2020 17:09:41 +0000 (19:09 +0200)]
tests: raise needed target version
Require higher version to avoid early bugs.
Zdenek Kabelac [Sun, 13 Sep 2020 09:33:13 +0000 (11:33 +0200)]
tests: improve cache abort test
Use bigger volume and slowdown writing to cache device.
This allows more simple to reach 'dirty' state.
Also document exactly 1 SIGINT has to fire aborting of flushing.
Zdenek Kabelac [Sat, 12 Sep 2020 17:04:56 +0000 (19:04 +0200)]
tests: check in_sync prints also dm status
It's more useful to see how the progress of status checking is moving.
Zdenek Kabelac [Sun, 13 Sep 2020 09:33:39 +0000 (11:33 +0200)]
cache: simplier signal handling
Use just single sigint_allow()/restore() within flushing loop
and void one extra signal manipulation.
Zdenek Kabelac [Sun, 13 Sep 2020 09:32:29 +0000 (11:32 +0200)]
headers: remove unused headers
Zdenek Kabelac [Sat, 12 Sep 2020 17:04:22 +0000 (19:04 +0200)]
configure: just upper case start of sentence
Zdenek Kabelac [Sun, 13 Sep 2020 19:10:17 +0000 (21:10 +0200)]
locking: restore blocking signal for VG_GLOBAL lck
During removal of a lot of locking code the signal blocking got lost
and signal processing got broken leading to unpredictable
behavior of i.e. activation code the can get interrupted in the
middle of DM table processing.
lvm2 code always expects signals are blocked while lock is held
unless it is explictelly placed into section of:
sigint_allow();....;sigint_restore();
For checking catched interrupt there is sigint_catched();
Zdenek Kabelac [Sat, 12 Sep 2020 10:25:58 +0000 (12:25 +0200)]
tests: avoid using string
String 'TEST WARNING' may not be present in the test script itself.
Add '\ ' to avoid 'grep' matching test as the test with warning.
Zdenek Kabelac [Sat, 12 Sep 2020 07:47:38 +0000 (09:47 +0200)]
tests: support for 16T is needed
Likely 32bit machines can't pass here.
Zdenek Kabelac [Sat, 12 Sep 2020 07:46:43 +0000 (09:46 +0200)]
tests: change skip to die for upstream crash
So the failing test is not lost from sight.
Zdenek Kabelac [Sat, 12 Sep 2020 07:46:21 +0000 (09:46 +0200)]
tests: skip test on failing kernel
Zdenek Kabelac [Sat, 12 Sep 2020 11:15:12 +0000 (13:15 +0200)]
cov: drop checking for EWOULDBLOCK
Reduce cov warning and remove this really ancient define
as lvm2 was never compilable on such platform.
Zdenek Kabelac [Sat, 12 Sep 2020 11:03:07 +0000 (13:03 +0200)]
cov: check sscanf result
Zdenek Kabelac [Sat, 12 Sep 2020 07:45:52 +0000 (09:45 +0200)]
cov: drop model for origin_from_cow
Zdenek Kabelac [Sat, 12 Sep 2020 10:08:15 +0000 (12:08 +0200)]
lvconvert: check if LV has cow type
Cow may not be a COW type, the return value of origin_from_cow(cow) may be NULL.
Reported-by: Wu Guanghao <wuguanghao3@huawei.com>
Reported-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Zdenek Kabelac [Sat, 12 Sep 2020 10:07:12 +0000 (12:07 +0200)]
revert "lvconvert: check if LV has snapshot type"
This reverts commit
7db124774a2b79105e7c9c6b42df88219fc070ca .
Actually we need to check for lv_is_cow().
Zdenek Kabelac [Fri, 11 Sep 2020 19:15:42 +0000 (21:15 +0200)]
tests: check for boundary allocation sizes
Zdenek Kabelac [Fri, 11 Sep 2020 12:44:05 +0000 (14:44 +0200)]
tests: reduce disk space usage by pvck-dump
Lower disk usage for 'dd'.
Zdenek Kabelac [Fri, 11 Sep 2020 11:35:30 +0000 (13:35 +0200)]
tests: lower at_least to version 1.19
With this version already can be seen different metadata usage on
kernel side, so lower the target version.
Zdenek Kabelac [Fri, 11 Sep 2020 09:59:55 +0000 (11:59 +0200)]
tests: have_cache function checks for cache-pool
Check for cache-pool segment as plain cache can match writecache.
Zdenek Kabelac [Fri, 11 Sep 2020 18:57:20 +0000 (20:57 +0200)]
alloc: improve estimation of sufficient_pes_free
Metadata size was calculated correctly only for raids.
Fixes problem for crash during lvcreate when thin-pool was created
on a VG where remaining free space had the size to only fit a single
metadata LV and not also its _pmspare.
Lvcreate crashed with this assert message:
lvcreate: metadata/pv_map.c:198: consume_pv_area: Assertion `to_go <= pva->count' failed.
Aborted (core dumped)
TODO: there is probably to large overload of several alloc_handle
variables.
Reported-by: Wu Guanghao<wuguanghao3@huawei.com>
Reported-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Wu Guanghao [Fri, 11 Sep 2020 09:42:16 +0000 (17:42 +0800)]
lvconvert: check if LV has snapshot type
Cow may not be a snapshot type, the return value of origin_from_cow(cow) may be NULL
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Wu Guanghao [Fri, 11 Sep 2020 09:41:01 +0000 (17:41 +0800)]
lvconvert_poll: ensure LV has snapshot type
LV may not be a snapshot type, the return value of find_snapshot(lv) may be NULL.
Here, we will call stack if LV is not a snapshot type.
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Wu Guanghao [Fri, 11 Sep 2020 09:40:09 +0000 (17:40 +0800)]
pvmove: check return value of top_level_lv_name()
The return value of top_level_lv_name() may be NULL, so we should
check return value of top_level_lv_name before calling
strcmp(lv->name, top_level_lv_name(vg, lv_name)).
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Zhao Heming [Thu, 10 Sep 2020 15:38:07 +0000 (23:38 +0800)]
gitignore: ignore all cscope generated files
When using cscope to read code, it will generate below 3 files for speedup
cross-refer: cscope.files, cscope.in.out, cscope.po.out
The .gitignore only contains "/cscope.out". It a little bit messy when
executing 'git status', and other git commands.
This patch add all cscope generated files in .gitignore.
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
Zdenek Kabelac [Fri, 11 Sep 2020 11:31:55 +0000 (13:31 +0200)]
thin: compensate metadata size by extra percent
When using --use-policy for automatic extension of thin-pool,
the extension of thin-pool's metadata itself can actually take
some extra space.
Since I'm not aware of exact compensation formula, add just
1% extra to calculated amount and hope it fits.
Wanted target is to always have usable thin-pool that fits
bellow pool_metadata_min_threshold().
Zdenek Kabelac [Fri, 11 Sep 2020 11:31:29 +0000 (13:31 +0200)]
lv_manip: even better rounding
Zdenek Kabelac [Thu, 10 Sep 2020 15:05:02 +0000 (17:05 +0200)]
tests: aux collects stack trace when stuck is assumed
Automatically collect traces in this case.
Zdenek Kabelac [Thu, 10 Sep 2020 14:47:52 +0000 (16:47 +0200)]
tests: adding "" around DM_DEV_DIR
Zdenek Kabelac [Thu, 10 Sep 2020 14:39:07 +0000 (16:39 +0200)]
tests: disable dbustest with valgrind testing
Zdenek Kabelac [Thu, 10 Sep 2020 20:38:13 +0000 (22:38 +0200)]
cleanup: comment typo
Zdenek Kabelac [Thu, 10 Sep 2020 21:33:46 +0000 (23:33 +0200)]
debug: drop debug trace from regular path
Since we query on regular code these:
lv_raid_has_integrity()
lv_has_integrity_recalculate_metadata()
without prior checking for lv_is_raid() - these 'return 0' should
not use <stacktrace> as they are expected.
Zdenek Kabelac [Thu, 10 Sep 2020 15:39:43 +0000 (17:39 +0200)]
lv_manip: relocate check to proper function
Zdenek Kabelac [Thu, 10 Sep 2020 20:38:34 +0000 (22:38 +0200)]
lvextend: improve percentage estimation
Correcting rounding rules for percentage evaluation.
Validate supported range of percentage.
(although ranges are already validated earlier on code path)
Zdenek Kabelac [Wed, 9 Sep 2020 13:56:06 +0000 (15:56 +0200)]
configure: compile with vdo and writecache by default
Enable compilation of vdo and writecache support as internaly
supported segment types by default.
For disabling use:
--with-vdo=none
--with-writcache=none
David Teigland [Wed, 9 Sep 2020 15:22:07 +0000 (10:22 -0500)]
integrity: fix segfault reporting integrity for other lvs
Zdenek Kabelac [Wed, 9 Sep 2020 13:14:22 +0000 (15:14 +0200)]
man: correcting vdo issues
Fixing reported bugs within provided examples - so examples
can be used via cut&paste.
Zdenek Kabelac [Wed, 9 Sep 2020 11:22:37 +0000 (13:22 +0200)]
man: correctly use configured directories
Zdenek Kabelac [Tue, 8 Sep 2020 22:58:52 +0000 (00:58 +0200)]
Revert "raid: add _rimage and _rmeta as origin_only"
This reverts commit
3388e194892e9ab7a36b72e512796c2d218dae6e .
More thinking needed.
Zdenek Kabelac [Tue, 8 Sep 2020 22:58:32 +0000 (00:58 +0200)]
Revert "raid: do not enforce flushing of raids when it is not required"
This reverts commit
ce5ea07411d57a2bd276d8d29e46ce30b957f657 .
More thinking needed.
Zdenek Kabelac [Mon, 7 Sep 2020 22:22:16 +0000 (00:22 +0200)]
tests: tune extend test
For proper checking of extension progress require version 1.15
It looks with older versoin extension happens during very slow
resume within lvm command - although speed is still somewhat slow
with latest version.
Zdenek Kabelac [Fri, 4 Sep 2020 19:08:32 +0000 (21:08 +0200)]
tests: check for writecache being compiled in
Zdenek Kabelac [Fri, 4 Sep 2020 18:35:55 +0000 (20:35 +0200)]
tests: check for cache_version that supports v2
Zdenek Kabelac [Tue, 8 Sep 2020 19:09:06 +0000 (21:09 +0200)]
raid: do not enforce flushing of raids when it is not required
This is probably somewhat experimantal patch - but when i.e. raid device
is just extend, there should not be a technical need for flush,
unless the target would stricly need it. It should allow faster
processing of lvm command not being blocked by possibly longer flush.
Zdenek Kabelac [Tue, 8 Sep 2020 19:06:23 +0000 (21:06 +0200)]
raid: add _rimage and _rmeta as origin_only
Since we do not support rimage & rmeta for snapshots - we can
avoid quering for -cow devices and add them as origin_only -
since their snapshots (-cow) could have never existed.
This redumes several ioctl operation during table preloading.
Zdenek Kabelac [Tue, 8 Sep 2020 13:20:50 +0000 (15:20 +0200)]
lv_manip: add synchronization points
Zdenek Kabelac [Fri, 4 Sep 2020 18:55:02 +0000 (20:55 +0200)]
lvconvert: flip return value of _raid_split_image_conversion
Use '0' for error and '1' as success.
Also drop INTERNAL_ERROR from path - as this error
is ATM used for invalid devices.
(i.e. test lvconvert-raid1-split-trackchanges.sh)
David Teigland [Fri, 4 Sep 2020 16:22:42 +0000 (11:22 -0500)]
tests: fix pvck repair in hints.sh
Zdenek Kabelac [Fri, 4 Sep 2020 16:05:01 +0000 (18:05 +0200)]
tests: use delayzero_dev
Speed-up a bit the first synchronization with just 50ms write delay,
but later set also delay on read to slowdown lvextend.
FIXME: there are still things to look at:
0 229376 raid raid1 2 AA 229376/229376 idle 0 0
0 229376 raid raid1 2 AA 0/229376 frozen 0 0 -
0 262144 raid raid1 2 AA 229376/262144 repair 0 0 -
0 262144 raid raid1 2 AA 229376/262144 repair 0 0 -
0 262144 raid raid1 2 AA 245888/262144 repair 0 0 -
Zdenek Kabelac [Fri, 4 Sep 2020 11:50:05 +0000 (13:50 +0200)]
tests: add aux delayzero_dev support
Just like we have 'writeerror_dev' supporting creation of device
which 'readable' segment and segments where write will fail we
have now support for delay zero mappings.
This is useful if we want to 'fake' large writing areas where we do
not really care about the actual 'disk' content - since we test
operation logic and it doesn't matter we read and write zeroes.
With combination with 'delay' target we can create specific mappings
and avoid using large memory areas of ramdisk.
David Teigland [Wed, 2 Sep 2020 19:45:52 +0000 (14:45 -0500)]
writecache: allow pvmove on origin
The removed check didn't actually prevent pvmoving the origin,
which was possible by naming the wcorig lv, or naming no lv.
David Teigland [Wed, 2 Sep 2020 19:21:17 +0000 (14:21 -0500)]
pvck: repair should clear hints
repairing a pv can cause the hint file to become incorrect
David Teigland [Wed, 2 Sep 2020 19:06:46 +0000 (14:06 -0500)]
hints: remove warning when clearing hint file
When the hint file cannot be accessed, silently
ignore hints, like other instances do.
David Teigland [Wed, 2 Sep 2020 17:40:45 +0000 (12:40 -0500)]
integrity: improve lv type checks
David Teigland [Wed, 2 Sep 2020 14:15:58 +0000 (09:15 -0500)]
integrity: fix segfault for lv with no seg
in lv_raid_has_integrity
David Teigland [Tue, 1 Sep 2020 22:07:36 +0000 (17:07 -0500)]
tests: add new integrity reporting fields
David Teigland [Tue, 1 Sep 2020 21:15:31 +0000 (16:15 -0500)]
integrity: report mismatches
with lvs -o integritymismatches
reported for integrity images, which may report
different values
David Teigland [Tue, 1 Sep 2020 19:39:34 +0000 (14:39 -0500)]
integrity: report raidintegritymode randintegrityblocksize
reported for the raid lv and the integrity images
David Teigland [Tue, 1 Sep 2020 17:53:00 +0000 (12:53 -0500)]
integrity: always default to journal mode
lvconvert was defaulting to bitmap mode,
and lvcreate was defaulting to journal mode.
Zdenek Kabelac [Tue, 1 Sep 2020 21:14:47 +0000 (23:14 +0200)]
tests: skip this test for current 5.8 5.9 kernels
Kernel is hitting not yet fixed kernel bug.
Skip the test to avoid killing testing machine.
Zdenek Kabelac [Tue, 1 Sep 2020 21:05:11 +0000 (23:05 +0200)]
tests: slightly faster
Use lvm shell to agregrate lots of lvm commands
Reduce initial zeroing.
Zdenek Kabelac [Tue, 1 Sep 2020 20:45:17 +0000 (22:45 +0200)]
tests: set skipping autoactivation
On test system with 'default' filter (aka accept all) test
after enabling device can suffer from automatic system
activation - so for created LVs setup skipping this automatic
activation. This should prevent getting LVs into table
with pvscan service.
Zdenek Kabelac [Tue, 1 Sep 2020 19:39:47 +0000 (21:39 +0200)]
tests: skip test when gcore cannot catch securetest
Zdenek Kabelac [Tue, 1 Sep 2020 19:17:14 +0000 (21:17 +0200)]
gcc: avoid shadowing of dev_name and pvs
Since we declare dev_name in lib/device/device.h
and pvs in commands.h
rename local dev_name to device_name
and pvs to pvs_list to prevent shadowing warning.
m
Zdenek Kabelac [Tue, 1 Sep 2020 18:46:18 +0000 (20:46 +0200)]
gcc: hide warn about possible uninitialized use of dev_ret
Older gcc reports this fp problem.
Zdenek Kabelac [Tue, 1 Sep 2020 19:14:39 +0000 (21:14 +0200)]
pvck: add simple check for fwrite
Add at least very light check for result code of fwrite().
Zdenek Kabelac [Tue, 1 Sep 2020 19:08:12 +0000 (21:08 +0200)]
pvck: use array of bytes
Fix typo in use array of pointers instead of array of bytes.
This fixes 'break strict-aliasing rules' warning printed with older gcc.
Zdenek Kabelac [Sat, 29 Aug 2020 20:37:17 +0000 (22:37 +0200)]
cleanup: better expressing passing key arg to _hash
Zdenek Kabelac [Sat, 29 Aug 2020 19:53:31 +0000 (21:53 +0200)]
cleanup: add spaces between literals
Zdenek Kabelac [Sat, 29 Aug 2020 19:53:05 +0000 (21:53 +0200)]
cleanup: user force_t enums instead of ints
Zdenek Kabelac [Sat, 29 Aug 2020 19:37:39 +0000 (21:37 +0200)]
cleanup: matching declaration order
Cosmetic
Zdenek Kabelac [Sat, 29 Aug 2020 18:40:20 +0000 (20:40 +0200)]
cov: avoid duplicated assign
Zdenek Kabelac [Sat, 29 Aug 2020 18:27:32 +0000 (20:27 +0200)]
cov: always initialized values
Make sure values are initialized for all possible paths.
Zdenek Kabelac [Tue, 1 Sep 2020 15:53:36 +0000 (17:53 +0200)]
cov: explicitely ignore function result
Zdenek Kabelac [Sat, 29 Aug 2020 17:56:37 +0000 (19:56 +0200)]
cov: always sure we end with '0'
Use easier dm_strncpy().
Zdenek Kabelac [Sat, 29 Aug 2020 20:24:34 +0000 (22:24 +0200)]
gcc: keep using unsigned type
This page took 0.064388 seconds and 5 git commands to generate.