]>
sourceware.org Git - lvm2.git/log
Zdenek Kabelac [Wed, 10 Apr 2024 13:46:24 +0000 (15:46 +0200)]
tests: use lvname with space
Occasionally this test fails as soemtimes UUID actually
may constain LV[d] string causing it to grep mismatch
UUID and LV name and eventually fail test for wrong reason.
As a simple workaround print the LV name first and
check the name is followed by a space character.
Zdenek Kabelac [Tue, 9 Apr 2024 15:51:47 +0000 (17:51 +0200)]
WHATS_NEW: update
Zdenek Kabelac [Tue, 9 Apr 2024 21:04:25 +0000 (23:04 +0200)]
tests: update unit-tests
Fix some memleaks.
Drop call of bcache_clear_fd() when bache was not initialized.
Zdenek Kabelac [Tue, 9 Apr 2024 21:29:15 +0000 (23:29 +0200)]
tests: update for faster dmeventd
We can drop sleep 6, since dmeventd will quit immediatelly
when no running dmeventd can be restarted.
Also restart itself check more conditions.
Zdenek Kabelac [Tue, 9 Apr 2024 14:20:07 +0000 (16:20 +0200)]
tests: add missing vgck
This test missed being adjusted with this updated workflow
so it's been testing something different...
Zdenek Kabelac [Mon, 8 Apr 2024 22:33:16 +0000 (00:33 +0200)]
tests: aux fallback to sleep
When dbus-send tool is not present on system, fallback to sleep.
Zdenek Kabelac [Mon, 8 Apr 2024 22:33:59 +0000 (00:33 +0200)]
tests: drop test warning
These kernel are not going to be ever fixed, so drop warning
being displayed for these tests.
Zdenek Kabelac [Tue, 9 Apr 2024 16:34:01 +0000 (18:34 +0200)]
cov: mask false positive
This code is somewhat complex and involves recursion and pointer
shuffling which confuses coverity here.
Let's add masking comment for this warning as there is no double
free in this code.
Zdenek Kabelac [Tue, 9 Apr 2024 15:36:20 +0000 (17:36 +0200)]
cov: pass buffer size
Zdenek Kabelac [Tue, 9 Apr 2024 14:43:38 +0000 (16:43 +0200)]
gcc: remove warning about inlining failure
Persuade gcc we want this function to be inline and avoid:
warning: inlining failed in call to ‘lvmlockd_open.constprop.0’:
Zdenek Kabelac [Tue, 9 Apr 2024 14:37:04 +0000 (16:37 +0200)]
cov: use check of snprintf result
Do validation in one go with snprintf() result,
so there is no extra strlen() and uncheck possibly truncating snprintf()
visible to coverity.
Zdenek Kabelac [Tue, 9 Apr 2024 14:18:05 +0000 (16:18 +0200)]
cov: use stream ptr in its original form
Let's stop Coverity thinking here we are using freed FILE*
for anything else then comparing numbers.
For this use the original source of old_stream pointer.
Zdenek Kabelac [Tue, 9 Apr 2024 09:43:14 +0000 (11:43 +0200)]
cov: use dm_strncpy variant
Zdenek Kabelac [Tue, 9 Apr 2024 09:42:06 +0000 (11:42 +0200)]
cov: make obvious how free of memory happens
When there is allocation, it needs also deallocator.
Remove no longer needed coverity warning masking.
Zdenek Kabelac [Tue, 9 Apr 2024 09:36:31 +0000 (11:36 +0200)]
cov: use safer version with size limitation
Although there is likely not much risk of having chance of overwritting
given buffers use safer variant.
Use dm_strncpy() when just copying %s.
Zdenek Kabelac [Tue, 9 Apr 2024 09:35:23 +0000 (11:35 +0200)]
cov: extra pointer validation
Add few more internal errors to enusure there is no use of NULL pointers
along the code path.
Zdenek Kabelac [Tue, 9 Apr 2024 09:40:20 +0000 (11:40 +0200)]
cov: replace strcpy with memcpy
When we know the size we can avoid using strcpy.
Zdenek Kabelac [Mon, 8 Apr 2024 22:31:57 +0000 (00:31 +0200)]
cov: use memccpy
When we want to copy string which may not be null terminated,
replace strncpy with more correct memccpy.
Zdenek Kabelac [Tue, 9 Apr 2024 21:29:02 +0000 (23:29 +0200)]
dmeventd: restart checks for running daemon
Check whether the pid file is associated with running daemon.
If not there is not much point to wait many seconds in loop.
Zdenek Kabelac [Tue, 9 Apr 2024 15:27:12 +0000 (17:27 +0200)]
toolib: skip when there is no vg and error_vg
We must skip even if the skip would be suggesting otherwise
if there is no vg and no error_vg as there is nothing to process.
Zdenek Kabelac [Tue, 9 Apr 2024 12:50:52 +0000 (14:50 +0200)]
configure: add --with-default-event-activaion=ON
Add new configurable option for building lvm2 with enable/disable
default autoactivation setting.
Might be useful for building i.e. rpms for systems where
this event_activation is not desired.
Zdenek Kabelac [Tue, 9 Apr 2024 15:40:45 +0000 (17:40 +0200)]
reporter: correcting failure return value
This function do use ECMD_ return values,
so use ECMD_FAILED as initial value - used for internal error paths
Zdenek Kabelac [Mon, 8 Apr 2024 17:52:41 +0000 (19:52 +0200)]
gitignore: add more ignored suffixes
Zdenek Kabelac [Mon, 8 Apr 2024 20:19:33 +0000 (22:19 +0200)]
makefiles: add libdm as deps for unit-test
When using just 'make check' ensure we make also dmsetup
so it's not needed to run explicit 'make' to get all the tools.
Zdenek Kabelac [Mon, 8 Apr 2024 19:16:33 +0000 (21:16 +0200)]
tests: include date and hostname IPs in test log
When our testing machines are going wild with NetworkManager,
this might be slightly helping.
Zdenek Kabelac [Mon, 8 Apr 2024 19:14:54 +0000 (21:14 +0200)]
tests: add timestamp to kernel line
Parse timestamps included in kernel kmsg line and add current system
time to the messsage as well - this makes it easier to look over,
when chasing some messages in journal after some time...
Zdenek Kabelac [Mon, 8 Apr 2024 17:48:50 +0000 (19:48 +0200)]
tests: check for supported dBus interface
Instead of blindly relying on sleeping, that dBus understands our
dBus interface, query the info with dbus-send.
Zdenek Kabelac [Mon, 8 Apr 2024 17:47:37 +0000 (19:47 +0200)]
tests: query dmeventd instead of sleep
Checking status of running instance of dmeventd should be a better 'sleep'.
Zdenek Kabelac [Mon, 8 Apr 2024 17:44:39 +0000 (19:44 +0200)]
dmeventd: check for running dmeventd for status
Before initiation fifo communication, check whether there is
running dmeventd - in case there is no running instance, this
would be just blocked for 5 seconds trying to open fifo.
Zdenek Kabelac [Mon, 8 Apr 2024 12:31:22 +0000 (14:31 +0200)]
tests: use non inlined copy constructor
gcc would like to see code without trying to inline large
copy constructor used for std::vector
Zdenek Kabelac [Mon, 8 Apr 2024 11:31:24 +0000 (13:31 +0200)]
makefiles: avoid using # with awk
Also awk got annoyed by this \# char sequence which is reported
as incorrect, however older rpm builder were failing without this.
So let's just try other variant.
Zdenek Kabelac [Mon, 8 Apr 2024 11:10:16 +0000 (13:10 +0200)]
makefiles: use SHOW
Zdenek Kabelac [Mon, 8 Apr 2024 12:10:18 +0000 (14:10 +0200)]
gcc: clear some complains
Use dm_strncpy() were possible to get rid of gcc compile warnings.
Zdenek Kabelac [Sun, 7 Apr 2024 12:25:37 +0000 (14:25 +0200)]
WHATS_NEW: update
Zdenek Kabelac [Sun, 7 Apr 2024 17:58:30 +0000 (19:58 +0200)]
tests: add sleep
mdadm may eventually be too slow...
Zdenek Kabelac [Sun, 7 Apr 2024 11:01:26 +0000 (13:01 +0200)]
pools: no checking for lv/vgremove deactivation
Thin-pool and cache-pool targets got already quite stable so let's try
to remove checking of pools when using lvremove or vgremove commands.
This skips checking pools when they are going to be removed, but it
also when removing thin volume that was the only user of a thin-pool.
In this case thin-pool will be still there and could be activated
again with another thin volume and thin_check will be executed
in this moment. In this case it can delay discovery of metadata damage.
Zdenek Kabelac [Sun, 7 Apr 2024 10:58:34 +0000 (12:58 +0200)]
thin-pool: avoid reactivation on new thin-pool
Shortens processing of 'lvcreate -L -V -T' command and
avoid deactivation and its activation with thin_check of the empty
created thin-pool that will be used for the new thin volume
made with a single lvcreate command.
Zdenek Kabelac [Sun, 7 Apr 2024 10:56:33 +0000 (12:56 +0200)]
vdo: modprobe dm-vdo for kernels >= 6.9
Modprobe "dm-vdo" with new kernels >= 6.9 and go for
'kvdo' with older Linux kernels.
Zdenek Kabelac [Fri, 5 Apr 2024 12:30:25 +0000 (14:30 +0200)]
WHATS_NEW: update
Zdenek Kabelac [Fri, 5 Apr 2024 12:25:27 +0000 (14:25 +0200)]
tests: skip convertions tests for usptream driver
Zdenek Kabelac [Fri, 5 Apr 2024 11:17:13 +0000 (13:17 +0200)]
tests: add correct condition for skip of lvmpolld tests
Check when flavour want to test lvmlockd & lvmpolld tests and
in for case ignore SKIP_WITH_LVMPOLLD from test script.
Zdenek Kabelac [Fri, 5 Apr 2024 12:00:11 +0000 (14:00 +0200)]
vdo: use stats msg parser for also segment status
Shuffle code to parsing VDO message also for lvs segment status
so it can report correctly data usage for VDO LVs.
For this change move code and also change its API to use just mempool.
Fixes usage with upstream 6.9 vdo target driver.
Zdenek Kabelac [Fri, 5 Apr 2024 11:09:10 +0000 (13:09 +0200)]
vdo: fix status message parsing
When using message API for parsing VDO stats info, 0 was wrongly
used for fallback for trying the old sysfs API.
Switch to use ULLONG_MAX for values that could not have been obtained
through the message call.
Fixes lvdisplay info for freshly created VDO volume with 0 used data
blocks.
Zdenek Kabelac [Thu, 4 Apr 2024 17:30:38 +0000 (19:30 +0200)]
tests: updated check for dm-vdo module
With new kernels dm-vdo is now correct name,
so use standard loading and just try extra for kvdo.
Zdenek Kabelac [Thu, 4 Apr 2024 14:50:18 +0000 (16:50 +0200)]
tests: inittest fix skipping condition
Zdenek Kabelac [Wed, 3 Apr 2024 23:29:30 +0000 (01:29 +0200)]
dev_manager: improve readability
Make a seperate function to decode which ID should be user
for cvol meta or data volume - also avoids duplication of code.
As a result it's now also easier to see how the lvid is build.
Zdenek Kabelac [Wed, 3 Apr 2024 22:09:29 +0000 (00:09 +0200)]
device_id: add comment for trim
Zdenek Kabelac [Wed, 3 Apr 2024 19:01:40 +0000 (21:01 +0200)]
lvmlocks: rework dm_strncpy
Fix cutting away 1 character via incorrect usage of dm_strncpy
introduced in last batch of commits and use sizeof(buffer) to
get proper sizes.
In case of use strcpy_name_len() the replacement was invalid,
so we need to restore this case since sanlock uses buffer without
nul ending, so we would strip one more character from the buffer.
Also start to use dm_strncpy() without (void) for unchecked usage.
Zdenek Kabelac [Thu, 4 Apr 2024 16:42:24 +0000 (18:42 +0200)]
refactor: update dm_strncpy to _dm_strncpy
For checked versions of dm_strncpy use inline wrapper _dm_strncpy.
Zdenek Kabelac [Thu, 4 Apr 2024 15:03:30 +0000 (17:03 +0200)]
refactor: remove (void) from dm_strncpy usage
Start to use dm_strncpy() as unchecked version within source tree.
Zdenek Kabelac [Thu, 4 Apr 2024 16:41:42 +0000 (18:41 +0200)]
util: add _dm_strncpy
Add internal inline function wrapper for dm_strncpy().
Use it for calls where we test the result.
Avoids emitting warnings in Coverity for unchecked usage.
Zdenek Kabelac [Thu, 4 Apr 2024 15:54:52 +0000 (17:54 +0200)]
util: swap header file load order
Ensure libdevmapper is included before util.h since
we are going to add function that is using it.
TODO: maybe add include directly here...
Zdenek Kabelac [Wed, 3 Apr 2024 21:59:21 +0000 (23:59 +0200)]
cov: missing initializer
Ensure there is no code path with uninitialized takes_arg.
David Teigland [Wed, 3 Apr 2024 20:59:25 +0000 (15:59 -0500)]
lvmcache: free list of add_cache_devs
David Teigland [Wed, 3 Apr 2024 20:29:17 +0000 (15:29 -0500)]
lvmdevices: fix memleak of use_old du
missed in the the prev done_old commit
Zdenek Kabelac [Fri, 29 Mar 2024 14:42:38 +0000 (15:42 +0100)]
cleanup: remove lvmcache_has_bad_metadata
Zdenek Kabelac [Fri, 29 Mar 2024 23:08:47 +0000 (00:08 +0100)]
cleanup: drop unused code
Zdenek Kabelac [Fri, 29 Mar 2024 14:58:51 +0000 (15:58 +0100)]
filtes: remove lvmetad bits from usable filter
Eliminate some dead code from usable filter, that is no longer usable
after removal of lvmetad.
Zdenek Kabelac [Fri, 29 Mar 2024 21:44:21 +0000 (22:44 +0100)]
device_id: simplier loop control
Zdenek Kabelac [Fri, 29 Mar 2024 21:43:48 +0000 (22:43 +0100)]
device_id: use dm_strncpy
Simplify code.
Zdenek Kabelac [Fri, 29 Mar 2024 21:43:06 +0000 (22:43 +0100)]
deviced_id: use zalloc
While moving to dm_strncpy, in this case since pvid is also
passed to crc calc, make sure whole buffer is always initilized.
Zdenek Kabelac [Fri, 29 Mar 2024 20:27:06 +0000 (21:27 +0100)]
filter: zero internal structure
Valgrind noticed access to unitialized warned_filter.
Zdenek Kabelac [Fri, 29 Mar 2024 21:44:48 +0000 (22:44 +0100)]
lvmdevices: fix memleak of done_old du
'done_old' list missed released.
Zdenek Kabelac [Thu, 28 Mar 2024 23:32:37 +0000 (00:32 +0100)]
cov: cast to uint32
Zdenek Kabelac [Thu, 28 Mar 2024 23:07:38 +0000 (00:07 +0100)]
cov: validate count is bigger then 0
To avoid teoretical underflow...
Zdenek Kabelac [Thu, 28 Mar 2024 23:07:13 +0000 (00:07 +0100)]
tests: better constructor
Zdenek Kabelac [Thu, 28 Mar 2024 22:37:51 +0000 (23:37 +0100)]
cov: validate major and minor
Check major and minor is >= 0.
Zdenek Kabelac [Thu, 28 Mar 2024 22:21:46 +0000 (23:21 +0100)]
cov: store 64b flags
Alhtough no target is currently using that many bits for their flags,
preserve the size for loaded segment internally.
Zdenek Kabelac [Thu, 28 Mar 2024 22:14:29 +0000 (23:14 +0100)]
cov: validate i before underflow
Although it can't happen in this code, ensure 'i' is not 0
before decrementing it.
Zdenek Kabelac [Thu, 28 Mar 2024 21:43:16 +0000 (22:43 +0100)]
cov: remove unnecessary sanity check
This sanity check actually confused in some way Coverity
giving it some assumption about array access.
Since these two checks basically validated compiler's capability
to add and then substract the number from char pointer we likely
don't really need them - as if this base math would not work,
compiler would be having far more troubles...
So drop them - and get rid of report:
Event overrun-call: Overrunning callee's array of size 513 by...
Zdenek Kabelac [Thu, 28 Mar 2024 21:08:41 +0000 (22:08 +0100)]
cov: use dm_strncpy
Use better variant.
Zdenek Kabelac [Thu, 28 Mar 2024 20:33:53 +0000 (21:33 +0100)]
cov: no overwrite of const qualified fields
Zdenek Kabelac [Thu, 28 Mar 2024 20:15:38 +0000 (21:15 +0100)]
cov: reset FILE on error path
Although fclose() fails - we should not be retrying with
already released stucture.
Tony Asleson [Wed, 27 Mar 2024 17:26:19 +0000 (12:26 -0500)]
tests: lvmdbusest.py faster test_z_sigint
Reduce #lv and intervals.
We are trying to ensure that the daemon stops while it's busy processing
its internal queues. Decrease the number of LVs and intervals to allow
this test to complete in less time.
Tony Asleson [Wed, 27 Mar 2024 16:50:24 +0000 (11:50 -0500)]
tests: lvmdbustest.py skip if g_tmo != 0
This test doesn't have any additional value when running when g_tmo != 0.
Tony Asleson [Wed, 27 Mar 2024 16:49:05 +0000 (11:49 -0500)]
lvmdbusd: Exit faster
Add a global timeout value to be used for the threads to end waiting for
whatever it is they are blocked on. The values varied from 2-5 seconds,
which is way longer than needed. Value of 0.5 shows no CPU load when
service is running and is idle.
Zdenek Kabelac [Wed, 27 Mar 2024 14:02:25 +0000 (15:02 +0100)]
cleanup: drop unused code
Code was related to long time obsoleted vgconvert
for lvm1 to lvm2 conversion.
This code likely was missed to be removed.
Zdenek Kabelac [Thu, 28 Mar 2024 16:19:44 +0000 (17:19 +0100)]
debug: update some structure members
Makes pahole output look slightly better.
Zdenek Kabelac [Thu, 28 Mar 2024 16:04:37 +0000 (17:04 +0100)]
commands: reduce command structure size more
Check for internal limits, if they would ever need to be raised report
error message and fail parsing.
Zdenek Kabelac [Thu, 28 Mar 2024 15:36:25 +0000 (16:36 +0100)]
cov: ensure buffer always ends with nul
When we print anything out of buffer, ensure there is \0.
Zdenek Kabelac [Thu, 28 Mar 2024 15:34:37 +0000 (16:34 +0100)]
cov: ensure nul ends string
Zdenek Kabelac [Wed, 27 Mar 2024 00:25:45 +0000 (01:25 +0100)]
tests: skip some mirror tests for polld and lockd
Leave just lvconvert-mirror-basic-1 test
for polld and lockd testing.
Zdenek Kabelac [Wed, 27 Mar 2024 00:03:08 +0000 (01:03 +0100)]
gcc: use uint16_t for counters
Zdenek Kabelac [Tue, 26 Mar 2024 23:46:17 +0000 (00:46 +0100)]
gcc: move declaration into ifdef
Prevent unused warning when the ifdef code is not compiled.
Zdenek Kabelac [Tue, 26 Mar 2024 23:36:33 +0000 (00:36 +0100)]
gcc: match signed integers
Zdenek Kabelac [Tue, 26 Mar 2024 23:19:52 +0000 (00:19 +0100)]
configure: lcov needs -fprofile-update=atomic
To avoid negative counters.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68080
Zdenek Kabelac [Tue, 26 Mar 2024 23:28:14 +0000 (00:28 +0100)]
device_id: use dm_basename
Avoid problems for other libc like muslc and use dm_basename.
Prototype for basename has been removed from string.h from latest musl [1]
compilers e.g. clang-18 flags the absense of prototype as error. therefore
include libgen.h for providing it.
[1] https://git.musl-libc.org/cgit/musl/commit/?id=
725e17ed6dff4d0cd22487bb64470881e86a92e7
Reported-by: Khem Raj <raj.khem@gmail.com>
Zdenek Kabelac [Mon, 25 Mar 2024 18:20:55 +0000 (19:20 +0100)]
dmsetup: refactor getopt_long usage
Shuffle code to avoid using static variable to pass parsed option.
Code is now easier to follow and also number of coverity reports
will go away.
There should be no functional change.
Zdenek Kabelac [Mon, 25 Mar 2024 16:17:40 +0000 (17:17 +0100)]
tests: missed reduction of raid check
Zdenek Kabelac [Mon, 25 Mar 2024 16:17:24 +0000 (17:17 +0100)]
cov: use proper enum value
Zdenek Kabelac [Mon, 25 Mar 2024 16:16:00 +0000 (17:16 +0100)]
cov: ensure namelist is defined
Seems coverity doesn't have good model for scandir.
Let's ensure pointer is seen as defined.
Zdenek Kabelac [Mon, 25 Mar 2024 15:59:27 +0000 (16:59 +0100)]
cov: validate return from display_lvname
Ensure strdup will not get NULL.
Zdenek Kabelac [Mon, 25 Mar 2024 15:57:53 +0000 (16:57 +0100)]
cov: validate origin pointer
Add internal error for NULL origin here.
Zdenek Kabelac [Mon, 25 Mar 2024 15:54:11 +0000 (16:54 +0100)]
cov: drop some unneeded continue
Zdenek Kabelac [Mon, 25 Mar 2024 15:38:52 +0000 (16:38 +0100)]
cov: check for syscall resuls
Zdenek Kabelac [Mon, 25 Mar 2024 15:37:04 +0000 (16:37 +0100)]
cov: ensure buffer is nul ended
Use dm_strncpy() to ensure ending nul.
Zdenek Kabelac [Mon, 25 Mar 2024 14:01:48 +0000 (15:01 +0100)]
tests: fix improper merge within last update
Zdenek Kabelac [Mon, 25 Mar 2024 13:34:39 +0000 (14:34 +0100)]
makefiles: ignore negative errors for lcov
Zdenek Kabelac [Mon, 25 Mar 2024 12:18:20 +0000 (13:18 +0100)]
tests: check for raid shrink support
Shrink of raid LVs supported from 1.9
Zdenek Kabelac [Mon, 25 Mar 2024 13:33:40 +0000 (14:33 +0100)]
cov: check for to_dlm_mode return value
Avoid processing invalid to_dlm_mode in lm_convert_dlm.
This page took 0.068455 seconds and 5 git commands to generate.