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

19165 Commits

Author SHA1 Message Date
Zdenek Kabelac
6ece8b74f0 command: split man-generator code
Move code for generating man pages to man-generator.c
which is no longer a symlink to command.c and just
includes this file for the common code.
2024-04-29 00:13:43 +02:00
Zdenek Kabelac
063ade474c command: refactor if condition 2024-04-29 00:13:43 +02:00
Zdenek Kabelac
ecabdf68cf lvconvert: use cmd_context variable
Do not modify flags field from 'strcut command_name' and
instead control this via cmd_context  get_vgname_from_options.

Flag GET_VGNAME_FROM_OPTIONS is currently used only by lvconvert.
2024-04-29 00:13:43 +02:00
Zdenek Kabelac
1bb03cff66 lvmdbusd: its fine if dir already exists
With previous patch, we now need to handle the case
when dir already exists.
2024-04-29 00:13:43 +02:00
Zdenek Kabelac
7c4be946cb dmeventd: use standard reopening mechanism
Apply same code for reopening /dev/null for 0,1,2 when daemonizing.
2024-04-27 00:36:24 +02:00
Zdenek Kabelac
d194fb8513 daemon-stray: correct size limitation for filename
Correct the buffer size for filename printing.
2024-04-26 23:51:38 +02:00
Kai Kang
b3189d9b15 lvmdbusd: create dirs for lock file
Create leading dirs for lvmdbusd lock file, otherwise it fails to start:

| systemd[1]: Starting LVM2 D-Bus service...
| lvmdbusd[1602]: [1602]: Error during creation of lock file(/var/lock/lvm/lvmdbusd): errno(2), exiting!

Signed-off-by: Kai Kang <kai.kang@windriver.com>
2024-04-26 23:17:56 +02:00
Zdenek Kabelac
6e985f553b WHATS_NEW: update 2024-04-26 21:37:52 +02:00
Zdenek Kabelac
e51c2376dd make: generate 2024-04-26 21:37:52 +02:00
Zdenek Kabelac
38cc021d67 cmdlines: use OO_LVCREATE_RAID
Common options in one OO_
2024-04-26 21:37:52 +02:00
Zdenek Kabelac
41e0a93a8f cmdlines: simplify OO_LVCONVER/LVCREATE_THINPOOL
OO_LVCONVERT_THINPOOL always constains OO_LVCONVERT_POOL
OO_LVCREATE_THINPOOL always contains OO_LVCREATE_POOL

More readable description.
2024-04-26 21:37:51 +02:00
Zdenek Kabelac
ce97056a7a tests: resize thin-pool with vdo data 2024-04-26 21:37:51 +02:00
Zdenek Kabelac
82c062be74 tests: correcting test for invalid commnad
Correting typo in specification of create --typo.
Also removing some unnecessary parts...
2024-04-26 21:37:51 +02:00
Zdenek Kabelac
95fca3d1d5 makefile: avoid creating shared lib for static only build 2024-04-26 21:37:51 +02:00
Zdenek Kabelac
3fc34ac7ee vdo: fix setting VDO size when stacked
When VDO is used as data LV for thin-pool, we need
to use correct function to propagate this through
the stack of volumes.
2024-04-26 21:37:51 +02:00
David Teigland
21b683614c lvmcache: stop saving duplicate pvs info between scans
In the past it was common for a single command to run
multiple lvmcache_label_scan, and this code was a way
to make each call select the same duplicate pvs.  Now
commands run a single lvmcache_label_scan, so this is
not needed.
2024-04-26 14:13:46 -05:00
Zdenek Kabelac
db96e81f76 tests: wait for raid being in sync 2024-04-26 12:43:03 +02:00
Zdenek Kabelac
d0cfe73326 cov: unused headers 2024-04-26 00:13:34 +02:00
Zdenek Kabelac
57ab219d9b cov: validation
Add internal error for missing vg.
2024-04-26 00:13:34 +02:00
Zdenek Kabelac
c6a37ddca4 toolcontext: check runtime valgrind
When reseting stream buffer - check for being run within valgrind
and only in this case skip this code.
Define VALGRIND_POOL was incorrectly used for this logic.
2024-04-25 21:26:01 +02:00
Zdenek Kabelac
4c5eb2e713 daemon-stray: compile also with VALGRIND_POOL
We can run and build this code just fine with VALGRIND_POOL
and just rely on runtime detection - so we do not close
descriptors also within running valgrind session.
2024-04-25 21:07:36 +02:00
Zdenek Kabelac
4557427a61 spec: require ncurses only for readline
Hopefully editline can go without ncurses dependency.
2024-04-25 17:08:19 +02:00
Zdenek Kabelac
b0c0e8bd7a makefiles: change condition
Old system do not work well with -l% in findstring,
so use a different strategy to recognize whether -lreadline needs
another library (-ltinfo, -lncourses...)
(So we don't need to solve this via 'configure')

Also for now comment out -Wl,-z,pack-relative-relocs and leave it
for the package maintainer whether they want to use.
Possibly add some 'configure' autodetection for usable switch,
as it's relatively new feature..
2024-04-25 17:06:07 +02:00
Zdenek Kabelac
68a8555d69 tests: avoid race check 2024-04-24 13:54:05 +02:00
Zdenek Kabelac
baebd7ca29 tests: accept also closing status 2024-04-24 13:44:58 +02:00
Zdenek Kabelac
b14f29ab5b makefiles: comman escape needs this trick 2024-04-24 13:42:05 +02:00
Zdenek Kabelac
a8009f72bf makefiles: add as-needed only for newer systems
Add some -Wl flags separatly and avoid their duplication.
Also add --as-needed only when system is using 'newer' readline
library - on these older system the usage of '--as-needed'
seems to be causing some hard to solve problem - so avoid it.
2024-04-24 11:35:05 +02:00
Zdenek Kabelac
ba13ac8704 tests: correct linking order for RT_LIBS 2024-04-24 11:34:35 +02:00
Zdenek Kabelac
f569ac59a7 configure: autoreconf 2024-04-24 00:38:32 +02:00
Zdenek Kabelac
078445658c configure.ac: update ldflags args
Attach -Wl,-z,relro,-z,now,-z,pack-relative-relocs,--as-needed
to LDFLAGS, but only if LDFLAGS already doesn't contain 'relro'
(so it's not given repeatedly).

Also start to use -z,now linkage also when building libraries
with default compilation - this avoid calling symbol resolver
while library function are using function needing resolving.

Note: Fedora or RHEL rpm building is using:
CFLAGS=$(rpm --eval %{build_cflags})
LDFLAGS=$(rpm --eval %{build_ldflags})

Also split -DUSE_SD_NOTIFY into DEFS from CFLAGS.
2024-04-24 00:31:26 +02:00
Zdenek Kabelac
f022da9e5f configure.ac: leave LDFLAGS resolving on make time
Use LDFLAGS separately with every use of CLDFLAGS and leave
this flag only for handling versioning.

This will reflect any LDFLAGS setting use during make.
2024-04-24 00:30:05 +02:00
Zdenek Kabelac
5d23054cb3 tests: update dmsecuretest
Look not only for whole 64byte sequence,
but seek also 32byte, 16byte and 8byte parts of the
key.

Currently to pass memcpy ZMM problems add possible
workaround in the form of GLIBC_TUNABLES setting.
2024-04-23 22:06:30 +02:00
Zdenek Kabelac
0b3b40f056 make: generate 2024-04-20 00:03:18 +02:00
Zdenek Kabelac
6caeffa4be tests: look also for 16byte sequences 2024-04-20 00:03:18 +02:00
Zdenek Kabelac
22571fb36a tests: add explicit call to lvs
Avoid using 'lvs' from  'get' shell - as that would wait until
whole group of processes is finished.

TODO: rethink what would be the point of starting 'dmeventd' with lvs.
It seems to break some rules.
2024-04-19 23:56:16 +02:00
Zdenek Kabelac
6ee731ba1a spec: define rhel_version_file for rhel only
Do not define rhel_minor_version on non-rhel systems.
2024-04-19 23:56:16 +02:00
Zdenek Kabelac
79bb9e3172 libdevmapper: _do_event waits for working dmeventd
Refactor _start_daemon and add synchronization delay waiting
untill new forked dmeventd actually open fifos and is ready
to process messages.

This closes some race window in testing.
2024-04-19 23:56:16 +02:00
David Teigland
85b711caae lvmlockd: check for multiple lock managers running
When no lock manager for the global lock had been set yet,
and the first global lock request was received, and both
dlm and sanlock were running, lvmlockd would assume it
should use the dlm for the global lock, and would start
the "lvm_global" dlm lockspace automatically.  That's
not always correct, so don't assume the dlm should be used,
fail the lock request, and wait until a VG with a specific
lock type is started to determine the lock manager to use.
2024-04-19 10:53:37 -05:00
David Teigland
f4911177da lvcreate: allow raidintegrity option with implicit raid type
Allow "lvcreate -m1 --raidintegrity y" when raid1 is used, but
not explicit on the command line.
2024-04-17 13:40:33 -05:00
Zdenek Kabelac
77ff83f784 spec: correct condition
Test needs to make sure that it's either <RHX or <FXX.
However they are set to 0 when on different system.
So use '&&'.
2024-04-16 21:17:42 +02:00
Zdenek Kabelac
b885355e76 tests: add extra dmsetup table
Strange race seems to be occuring here from time to time...
2024-04-16 21:17:42 +02:00
Zdenek Kabelac
2d01af8e56 tests: add another explicit barrier
Just to be sure compiler cannot optimize this out.
2024-04-16 21:17:42 +02:00
Zdenek Kabelac
bb276bf250 tests: update aux for vdo checking
Detect also presence of  'vdoformat' tool.
Fallback to 'kvdo' modprobe only when dm-vdo fails
(removed ugly error message from log)

Also add extra check for scsi model being present
so the test can wait a bit if 'scsi_debug' takes longer time.

No need for 'aux' within aux.
2024-04-16 21:17:42 +02:00
Zdenek Kabelac
93c47a2b94 tests: ensure sscan buffer is nul terminated
Avoid reading past the read buffer when sscanf is used.
2024-04-16 01:11:32 +02:00
Zdenek Kabelac
4ca9d478d4 spec: sanlock 3.7 with version >fc27 and >rh7.4
Decode minor version for rhel.
2024-04-16 01:10:47 +02:00
Zdenek Kabelac
485a1961e8 clang: implicit conversion from 'long' to 'double'
implicit conversion from 'long' to 'double' changes value
from 9223372036854775807 to 9223372036854775808.

So rather compare same integer types.
2024-04-16 01:10:03 +02:00
Zdenek Kabelac
d3d06f8ca0 WHATS_NEW: update 2024-04-15 13:45:11 +02:00
Zdenek Kabelac
569dd5d089 configure: autoreconf 2024-04-15 13:38:44 +02:00
Zdenek Kabelac
3b9bb773fe configure.ac: 3.7.0 is new minimal sanlock versioh
Require this minimal version of sanlock for usage with lvmlockd.
2024-04-15 13:38:44 +02:00
Zdenek Kabelac
716fc27fdd dmeventd: use daemon_close_stray_fds
Use common code for close stray descriptors.
2024-04-15 13:38:44 +02:00