]> sourceware.org Git - lvm2.git/log
lvm2.git
2 months agoudev: ignore private LVM devs in udev and systemd 1316155102
Peter Rajnoha [Mon, 3 Jun 2024 10:07:07 +0000 (12:07 +0200)]
udev: ignore private LVM devs in udev and systemd

We automatically ignore these devs, when lvm2 create devs,
whoever when lvm2 database is dropped or someone just
created these devs with such formated UUID, there is no
other informantion then to check DM UUID.

2 months agotests: fix wrong pos with CONFIG_PRINTK_CALLER
Zdenek Kabelac [Mon, 3 Jun 2024 11:41:06 +0000 (13:41 +0200)]
tests: fix wrong pos with CONFIG_PRINTK_CALLER

SUSE kernels distribution enables CONFIG_PRINTK_CALLER by default.

One line of cat /dev/kmsg is like:

6,904,9506214456,-,caller=T24012;loop8: detected capacity change from 0
to 354304

If CONFIG_PRINTK_CALLER is off:

6,721,53563833,-;loop0: detected capacity change from 0 to 354304

',caller=T24012' is the redundant part needed to be handled.
Otherwise pos will be lager than buf size causing sz underflowed.
Then constructor of std::string will throw a exception to break
tests:
$ make  check_local  T=shell/000-basic.sh
VERBOSE=0 ./lib/runner \
        --testdir . --outdir results \
        --flavours ndev-vanilla --only shell/000-basic.sh --skip @

running 1 tests
running: [ndev-vanilla] shell/000-basic.sh
            0:00.000Exception: basic_string::_M_create
make[1]: *** [Makefile:148: check_local] Error 1
make[1]: Leaving directory '/root/lvm2/test'
make: *** [Makefile:89: check_local] Error 2

Fix it with strchr for ';' as delimiter to get pos.

Reported-by: Su Yue <glass.su@suse.com>
2 months agoradix_tree: add radix_tree_values
Zdenek Kabelac [Sun, 2 Jun 2024 12:11:37 +0000 (14:11 +0200)]
radix_tree: add radix_tree_values

To more easily adopt radix_tree over existing code base, add
abstraction over 'radix_tree_iterate' which basically builds
an array of all traversed values, and then it's just easy to
go over all array elements.

TODO: code should be converted to use  radix_tree_iterate()
directly as it's more efficient.

Note: it can be possibly to rewrite recursive _iterate() usage
to linear travesal, not sure whether it's worth the effort
as conversion to 'radix_itree_iterator' is relatively simple.

2 months agoradix_tree: add radix_tree_lookup/insert_ptr
Zdenek Kabelac [Sat, 1 Jun 2024 17:30:33 +0000 (19:30 +0200)]
radix_tree: add radix_tree_lookup/insert_ptr

Add simple 'wrapper' inline functions to insert or return ptr lookup value.
(So the user doesn't need to deal with 'union radix_value' locally and
also it makes easier to translage some lvm2 functions to use radix_tree).

Note: If the stored 'value' would NULL, it cannot be recognized
from a case of 'not found'. So usable only when 'values' stored with
tree are not NULL.

2 months agoradix_tree: constify _iterate
Zdenek Kabelac [Sun, 2 Jun 2024 10:30:05 +0000 (12:30 +0200)]
radix_tree: constify _iterate

Use nodes as const.
Swap order of arguments.

2 months agoradix_tree: debug updates
Zdenek Kabelac [Sat, 1 Jun 2024 22:23:14 +0000 (00:23 +0200)]
radix_tree: debug updates

Some updates to _dump()  debugging function so the printed result
can be more easily examined by human.

Also print 'prefix' as string when all chars are printable.

Add 'simple' variant of _dump also to 'simple' version of radix tree
(which is however normally not compiled).

2 months agoradix_tree: api change
Zdenek Kabelac [Fri, 31 May 2024 19:46:19 +0000 (21:46 +0200)]
radix_tree: api change

Instead of using 'key state & key end' uint8_t* switch to use
void* key, & size_t keylen.  This allows easier adaptation with
lvm code base with way too much casting with every use of function.

Also correctly mark const buffers to avoid compiled warnings and
casting.

Adapt the only bcache user ATM for API change.

Adapt unit test to match changed API.

2 months agoradix_tree: indent
Zdenek Kabelac [Fri, 31 May 2024 14:21:24 +0000 (16:21 +0200)]
radix_tree: indent

Some minor indent changes to more easily read code.

2 months agogcc: drop const specifier from allocated string
Zdenek Kabelac [Thu, 30 May 2024 18:41:28 +0000 (20:41 +0200)]
gcc: drop const specifier from allocated string

Use nornal (char*) for pointers we should free().

2 months agocov: annotate already validated lv name
Zdenek Kabelac [Thu, 30 May 2024 12:40:45 +0000 (14:40 +0200)]
cov: annotate already validated lv name

2 months agocleanup: use _ for static var
Zdenek Kabelac [Thu, 30 May 2024 13:41:50 +0000 (15:41 +0200)]
cleanup: use _ for static var

Add missing '_' for some static vars.

2 months agocleanup: remove unneded headers
Zdenek Kabelac [Thu, 30 May 2024 12:24:00 +0000 (14:24 +0200)]
cleanup: remove unneded headers

As the common code was refactored to toollib, this header file
no longer needs to be included here.

2 months agodevice_id: more use of device_get_uuid
Zdenek Kabelac [Wed, 29 May 2024 21:50:38 +0000 (23:50 +0200)]
device_id: more use of device_get_uuid

Use function that is caching UUID if kernel provides functionality
from a single ioctl() call.

2 months agodev-mpath: check uuid with device_get_uuid
Zdenek Kabelac [Wed, 29 May 2024 20:43:11 +0000 (22:43 +0200)]
dev-mpath: check uuid with device_get_uuid

2 months agotypo: fix typos
Zdenek Kabelac [Tue, 28 May 2024 20:55:27 +0000 (22:55 +0200)]
typo: fix typos

Typo and indent.

2 months agocleanup: some more MAJOR MINOR unsigned
Zdenek Kabelac [Tue, 28 May 2024 14:17:53 +0000 (16:17 +0200)]
cleanup: some more MAJOR MINOR unsigned

Finish remaing missing cases where MAJOR/MINOR was casted to (int)
while we can now use it directly as 'unsigned'.

2 months agolvremove: reuse existing dm_build_dm_uuid
Zdenek Kabelac [Thu, 30 May 2024 12:17:33 +0000 (14:17 +0200)]
lvremove: reuse existing dm_build_dm_uuid

Use existing dm_build_dm_uuid() to generate LV's DM UUID.

2 months agovgimportdevices: skip global lockd locking 1312391201
David Teigland [Thu, 30 May 2024 19:51:22 +0000 (14:51 -0500)]
vgimportdevices: skip global lockd locking

Fix commit b65a2c3f3a767 "vgimportdevices: skip lvmlockd locking"
which intended to disable lvmlockd locking, but the lockd_gl_disable
flag was mistakenly set after lock_global() so it wasn't effective.
This caused vgimportdevices to fail unless locking was started.

2 months agoREADME: remove old branch names 1310480074
David Teigland [Wed, 29 May 2024 14:30:41 +0000 (09:30 -0500)]
README: remove old branch names

2 months agomake: generate 1308701008
Zdenek Kabelac [Tue, 28 May 2024 12:55:23 +0000 (14:55 +0200)]
make: generate

2 months agotests: accept new vdoformat output
Zdenek Kabelac [Mon, 27 May 2024 20:16:22 +0000 (22:16 +0200)]
tests: accept new vdoformat output

There is slight change in the printed size number.

2 months agoargs: generate configurable path
Zdenek Kabelac [Tue, 28 May 2024 12:54:00 +0000 (14:54 +0200)]
args: generate configurable path

2 months agotests: quoted DM_DEV_DIR 1307570978
Zdenek Kabelac [Mon, 27 May 2024 19:29:58 +0000 (21:29 +0200)]
tests: quoted DM_DEV_DIR

2 months agotests: use single aux lvmconf
Zdenek Kabelac [Mon, 27 May 2024 16:44:09 +0000 (18:44 +0200)]
tests: use single aux lvmconf

Reduce log size as lvmconf can process multiple settings at once.

2 months agodevice_id: use faster dm_strncpy
Zdenek Kabelac [Mon, 27 May 2024 19:31:54 +0000 (21:31 +0200)]
device_id: use faster dm_strncpy

2 months agodevice_mapper: solve no devices path
Zdenek Kabelac [Mon, 27 May 2024 16:13:47 +0000 (18:13 +0200)]
device_mapper: solve no devices path

Malloc needs to use sane value when names would be NULL.
Also for devices without 'uuid' return empty string instead of NULL.

2 months agolvremove: initilize struct list
Zdenek Kabelac [Mon, 27 May 2024 16:23:26 +0000 (18:23 +0200)]
lvremove: initilize struct list

2 months agolvremove: check for handle 1307327464
Zdenek Kabelac [Mon, 27 May 2024 15:01:25 +0000 (17:01 +0200)]
lvremove: check for handle

Get lvremove_params from non NULL handle.
Introduced in commit 47f8bda05.
TODO: any more thing needed ?

2 months agoWHATS_NEW: update 1307288018
Zdenek Kabelac [Sat, 25 May 2024 20:52:58 +0000 (22:52 +0200)]
WHATS_NEW: update

2 months agomake: generate
Zdenek Kabelac [Sun, 19 May 2024 20:35:29 +0000 (22:35 +0200)]
make: generate

2 months agocov: replace enum report_type_t with unsigned
Zdenek Kabelac [Mon, 27 May 2024 13:10:58 +0000 (15:10 +0200)]
cov: replace enum report_type_t with unsigned

Another enum used as bitfield mask.

2 months agocov: convert some more enternal field masks
Zdenek Kabelac [Mon, 27 May 2024 11:53:55 +0000 (13:53 +0200)]
cov: convert some more enternal field masks

Some more 'internal' masks misusing enums for bitfields.

2 months agocov: cleanup mask from enum to unsigned
Zdenek Kabelac [Mon, 27 May 2024 11:48:57 +0000 (13:48 +0200)]
cov: cleanup mask from enum to unsigned

Enums are single 'values' so not a proper type for bitfields.
(Probably better to use such values as defines).

Although here 'daemon_talk()' is part of library API, it's hidden
non-public API call - and moreover 'enum' and 'unsigned' are
using the same size, so linker shouldn't have any issue with
this symbol usage.

For this reason there are no 'versioning' tricks applied.

2 months agocov: annotate known use of validated lv name
Zdenek Kabelac [Mon, 27 May 2024 11:24:06 +0000 (13:24 +0200)]
cov: annotate known use of validated lv name

2 months agocleanup: remove blank spaces
Zdenek Kabelac [Mon, 27 May 2024 13:49:51 +0000 (15:49 +0200)]
cleanup: remove blank spaces

2 months agocleanup: refactor common code
Zdenek Kabelac [Mon, 27 May 2024 13:56:53 +0000 (15:56 +0200)]
cleanup: refactor common code

Refactor shared code from _get_rootvg_dev() between vgchange
and vgimportdevices to get_rootvg_dev_uuid() in toollib.c

2 months agotests: add some lvm shell testing
Zdenek Kabelac [Fri, 24 May 2024 18:46:08 +0000 (20:46 +0200)]
tests: add some lvm shell testing

Check lvm shell for autocomplete functionality and error reporting.

2 months agocleanup: print MAJOR and MINOR as unsigned
Zdenek Kabelac [Sat, 25 May 2024 20:36:18 +0000 (22:36 +0200)]
cleanup: print MAJOR and MINOR as unsigned

Print directly as %u instead of %d with (int) casting.

2 months agolibdm: use 'unsigned' for major minor
Zdenek Kabelac [Sat, 25 May 2024 21:05:53 +0000 (23:05 +0200)]
libdm: use 'unsigned' for major minor

Although linux uses 'dev_t' as 'unsigned long int' on 64bit,
it's easier to print with just '%u' instead of '%lu'.

2 months agocleanup: replace strlen with sizeof
Zdenek Kabelac [Sun, 26 May 2024 09:47:26 +0000 (11:47 +0200)]
cleanup: replace strlen with sizeof

Use the string size from compile time.

2 months agocleanup: use const for sizeof values
Zdenek Kabelac [Sun, 26 May 2024 09:30:06 +0000 (11:30 +0200)]
cleanup: use const for sizeof values

2 months agocleanup: simplier loop condition
Zdenek Kabelac [Thu, 23 May 2024 22:34:00 +0000 (00:34 +0200)]
cleanup: simplier loop condition

Check char for != 0.

2 months agocleanup: use correct log_sys_debug
Zdenek Kabelac [Wed, 22 May 2024 22:41:57 +0000 (00:41 +0200)]
cleanup: use correct log_sys_debug

2 months agocleanup: struct reorder
Zdenek Kabelac [Mon, 20 May 2024 12:15:38 +0000 (14:15 +0200)]
cleanup: struct reorder

Better alignments.

2 months agocleanup: some typos
Zdenek Kabelac [Fri, 17 May 2024 14:51:11 +0000 (16:51 +0200)]
cleanup: some typos

Collection of some typos or invalid uppercase or doublespace cases.

2 months agohash: increase some default hash table size
Zdenek Kabelac [Sat, 25 May 2024 22:33:16 +0000 (00:33 +0200)]
hash: increase some default hash table size

Size of these hashes was quite small, so raise the size of
hashed entries to reduce amount of hash collistion.
Select some unique/unused number for hash_create below 8192.

2 months agolibdm: drop allocation
Zdenek Kabelac [Fri, 17 May 2024 14:50:49 +0000 (16:50 +0200)]
libdm: drop allocation

Use structure allocated on local stack.

2 months agomirror: drop unneeded call
Zdenek Kabelac [Mon, 20 May 2024 12:46:20 +0000 (14:46 +0200)]
mirror: drop unneeded call

Major,minor,patchlevel are already set from previous call.

2 months agodevice: use device_get_uuid
Zdenek Kabelac [Thu, 23 May 2024 23:07:47 +0000 (01:07 +0200)]
device: use device_get_uuid

Replace call to get_dm_uuid_from_sysfs() with use of
device_get_uuid() which gets the same information,
but instead of several syscalls it need either 1 or even 0
when the information is cached with newer kernels.

2 months agodev_manager: remove disable_dm_dev flag
Zdenek Kabelac [Fri, 24 May 2024 19:21:16 +0000 (21:21 +0200)]
dev_manager: remove disable_dm_dev flag

Lvm currenly drops cache before first table manipulation
there is no need for this flag ATM.

2 months agodev_manager: drop cache for dm tree manipulation
Zdenek Kabelac [Fri, 24 May 2024 18:50:53 +0000 (20:50 +0200)]
dev_manager: drop cache for dm tree manipulation

We've got cached DM list before grabbing lock, so there
is some chance, that DM table has changed and we would
need to refresh this info.

TODO: benchmark, whether it would even make sense to refresh cache
and keep it content instead of using individual ioctl() for tree build.

2 months agolabel: cache dm dev list earlier
Zdenek Kabelac [Fri, 24 May 2024 18:50:46 +0000 (20:50 +0200)]
label: cache dm dev list earlier

Cache (when possibly with newer kernel) earlier within label
scanning loop, so the cache information can be also used by
hints file.

2 months agodevice_manager: add device_get_uuid
Zdenek Kabelac [Wed, 22 May 2024 23:36:50 +0000 (01:36 +0200)]
device_manager: add device_get_uuid

Function that is working with DM target is located within
lib/activate directory.

This function is able to use cached  dm_device_list when possible
to quickly resolve checks for device's UUID.

Function can fully replace get_dm_uuid_from_sysfs() and instead
of syscalls for open/read/close get the UUID with single ioctl.

When there is cached dm devs list, we can get many UUID from
a single syscall.

2 months agodevice: propagate struct cmd_context
Zdenek Kabelac [Thu, 23 May 2024 21:03:05 +0000 (23:03 +0200)]
device: propagate struct cmd_context

For better use of cached data located within cmd_context,
pass this structure from the top level function.
Also add missing '_' for static _dev_cache_index_devs.
No other change here.

2 months agodevice_mapper: use const for this API
Zdenek Kabelac [Thu, 23 May 2024 23:54:48 +0000 (01:54 +0200)]
device_mapper: use const for this API

Allow using constified version of devs_list.
Internal loop does not need to modify anythin in this stucture.

2 months agodevice_mapper: add dm_device_list_find_by_dev
Zdenek Kabelac [Mon, 27 May 2024 13:34:16 +0000 (15:34 +0200)]
device_mapper: add dm_device_list_find_by_dev

Introduce function to find device's name and uuid for
a given major:minor.

This information is cached with dm_device_list which reads all the
info from single ioctl(DM_DEVICE_LIST).
Lvm keeps major:minor name & uuid for active devices in the system.

2 months agodev-type: use if..else if...
Zdenek Kabelac [Wed, 22 May 2024 21:22:43 +0000 (23:22 +0200)]
dev-type: use if..else if...

Compare strings till the first match.

2 months agocommand: reorder vals order
Zdenek Kabelac [Wed, 22 May 2024 15:15:34 +0000 (17:15 +0200)]
command: reorder vals order

Keep most frequently used val names in front.

2 months agocommand: store val_name with its size
Zdenek Kabelac [Wed, 22 May 2024 15:15:20 +0000 (17:15 +0200)]
command: store val_name with its size

Compile length of val_name during compilation.

2 months agodev-cache: skip scanning known blockless dirs
Zdenek Kabelac [Wed, 22 May 2024 11:29:35 +0000 (13:29 +0200)]
dev-cache: skip scanning known blockless dirs

Skip scan and stat() for dirs and nodes within known /dev/ paths,
where no block devices are located.

Also strlen(_cache.dev_dir) just once.

TODO: add more dirs to _no_scan (configurable via lvm.conf ?)

2 months agodev-cache: collapsing slashes counts string size
Zdenek Kabelac [Wed, 22 May 2024 09:17:09 +0000 (11:17 +0200)]
dev-cache: collapsing slashes counts string size

_collapse_slashes() already goes through the whole string,
so just return now already known string length.

2 months agocleanup: use single array for idtype string
Zdenek Kabelac [Tue, 21 May 2024 16:53:15 +0000 (18:53 +0200)]
cleanup: use single array for idtype string

Share string array for de/coding idtype.

2 months agoerror: try with modprobe
Zdenek Kabelac [Mon, 20 May 2024 12:47:02 +0000 (14:47 +0200)]
error: try with modprobe

If the error target would be built as module,
ask modprobe to load it if the target is not present.

2 months agocleanup: relocate section
Zdenek Kabelac [Mon, 20 May 2024 12:03:21 +0000 (14:03 +0200)]
cleanup: relocate section

Move _features[] structure from .data.rel.ro to .rodata.

2 months agocleanup: use ALTERNATIVE_EXTENTS
Zdenek Kabelac [Wed, 22 May 2024 15:31:28 +0000 (17:31 +0200)]
cleanup: use ALTERNATIVE_EXTENTS

Instead of comparing string of command names,
introduce ALTERNATIVE_EXTENTS command flags.

2 months agocleanup: use ARG_LONG_OPT
Zdenek Kabelac [Fri, 17 May 2024 23:38:18 +0000 (01:38 +0200)]
cleanup: use ARG_LONG_OPT

Just like with _VAL strings, also _ARG strings do not need to
be present - as we can easily check for LONG opt version just
by adding attribute.

With attribute ARG_LONG_OPT string arg name[] becomes unused
and can be safely removed.

Also within _find_command_id_function() we do not need to handle
'command_enum == CMD_NONE' as separate case and just use single loop.

2 months agocleanup: do not store _VAL name string
Zdenek Kabelac [Fri, 17 May 2024 15:01:09 +0000 (17:01 +0200)]
cleanup: do not store _VAL name string

String enum_name[] is unused so remove is with
all generated strings.

Reoder struct members, so there are no holes.

2 months agolibdm: parse only block section for proc_devices
Zdenek Kabelac [Wed, 22 May 2024 21:23:54 +0000 (23:23 +0200)]
libdm: parse only block section for proc_devices

Check for begining of 'B'lock section in /proc/devices file
before starting to sscanf() for major.

2 months agolvmcmdline: use known lvm_command_enum
Zdenek Kabelac [Wed, 22 May 2024 21:22:14 +0000 (23:22 +0200)]
lvmcmdline: use known lvm_command_enum

lvm command is already decoded (when found),
so use lvm_command_enum directly and avoid
comparing all strings again...

2 months agocommand: return proper unsigned value
Zdenek Kabelac [Fri, 24 May 2024 18:43:44 +0000 (20:43 +0200)]
command: return proper unsigned value

Use better 'unsigned' value, so we don't have any 'casting' troubles.

2 months agolvm: fix shell completion
Zdenek Kabelac [Fri, 24 May 2024 17:49:08 +0000 (19:49 +0200)]
lvm: fix shell completion

Previous commit 82617852a4d3c89b09124eddedcc2c1859b9d50e
introduce bug in complession - as the rl_completion_matches()
needs to always advance to next element where the index
is held in static variable.

Add comment about this usage.

2 months agolvremove: remove device_id for PVs on LVs 1301446728
David Teigland [Wed, 22 May 2024 20:32:17 +0000 (15:32 -0500)]
lvremove: remove device_id for PVs on LVs

When PVs are created on LVs, remove the devices file entries
for the PVs when the LVs are removed.  In general, the devices
file entries should be removed with lvmdevices --deldev when
the LVs are removed (lvremove is the equivalent of detaching
a device from the system when layering PVs on LVs.)
This change is effectively an automatic lvmdevices --deldev
command that is built into lvremove when the LV has a PV on it.

2 months agoAllow system.devices to be automatically created on first boot 1299853171
David Teigland [Tue, 23 Apr 2024 22:08:26 +0000 (17:08 -0500)]
Allow system.devices to be automatically created on first boot

An OS installer can create system.devices for the system and
disks, but an OS image cannot create the system-specific
system.devices.  The OS image can instead configure the
image so that lvm will create system.devices on first boot.

Image preparation steps to enable auto creation of system.devices:
- create empty file /etc/lvm/devices/auto-import-rootvg
- remove any existing /etc/lvm/devices/system.devices
- enable lvm-devices-import.path
- enable lvm-devices-import.service

On first boot of the prepared image:
- udev triggers vgchange -aay --autoactivation event <rootvg>
- vgchange activates LVs in the root VG
- vgchange finds the file /etc/lvm/devices/auto-import-rootvg,
  and no /etc/lvm/devices/system.devices, so it creates
  /run/lvm/lvm-devices-import
- lvm-devices-import.path is run when /run/lvm/lvm-devices-import
  appears, and triggers lvm-devices-import.service
- lvm-devices-import.service runs vgimportdevices --rootvg --auto
- vgimportdevices finds /etc/lvm/devices/auto-import-rootvg,
  and no system.devices, so it creates system.devices containing
  PVs in the root VG, and removes /etc/lvm/devices/auto-import-rootvg
  and /run/lvm/lvm-devices-import

Run directly, vgimportdevices --rootvg (without --auto), will create
a new system.devices for the root VG, or will add devices for the
root VG to an existing system.devices.

2 months agopost-release 1293294001
Marian Csontos [Thu, 16 May 2024 10:12:06 +0000 (12:12 +0200)]
post-release

2 months agopre-release 1293294301 v2_03_24
Marian Csontos [Thu, 16 May 2024 10:12:06 +0000 (12:12 +0200)]
pre-release

2 months agopages: Use gitlab pages and ikiwiki for doc
Marian Csontos [Thu, 21 Dec 2023 12:48:50 +0000 (13:48 +0100)]
pages: Use gitlab pages and ikiwiki for doc

2 months agodoc: Update TESTING file
Marian Csontos [Thu, 16 May 2024 09:16:21 +0000 (11:16 +0200)]
doc: Update TESTING file

2 months agomakefiles: use properly defined varitable 1290508663
Zdenek Kabelac [Tue, 14 May 2024 14:54:00 +0000 (16:54 +0200)]
makefiles: use properly defined varitable

Variable used for tracking dependencies is USE_TRACKING.

2 months agotests: add basics for dm_hash unit testing
Zdenek Kabelac [Tue, 14 May 2024 15:47:33 +0000 (17:47 +0200)]
tests: add basics for dm_hash unit testing

Better code coverage.

2 months agogcc: clean cast with -Wbad-function-cast
Zdenek Kabelac [Tue, 14 May 2024 15:45:49 +0000 (17:45 +0200)]
gcc: clean cast with -Wbad-function-cast

Makes gcc happier.

2 months agogcc: same signess
Zdenek Kabelac [Tue, 14 May 2024 13:36:34 +0000 (15:36 +0200)]
gcc: same signess

2 months agogcc: use proper commnent
Zdenek Kabelac [Tue, 14 May 2024 13:35:07 +0000 (15:35 +0200)]
gcc: use proper commnent

2 months agogcc: better initilizer for older gcc compilers
Zdenek Kabelac [Mon, 13 May 2024 20:47:36 +0000 (22:47 +0200)]
gcc: better initilizer for older gcc compilers

So use  { { } }.

2 months agoactivation: log_debug_activation
Zdenek Kabelac [Mon, 13 May 2024 21:19:15 +0000 (23:19 +0200)]
activation: log_debug_activation

Correcting debug class.

2 months agotests: reduce number of created LVs 1288857715
Zdenek Kabelac [Mon, 13 May 2024 16:00:52 +0000 (18:00 +0200)]
tests: reduce number of created LVs

lvm2 for a while already optimizes 'vgremove' operation to
a single commit when possible if all LVs can be
easily deactivated.

So the number of LVs doesn't matter much - but the tested
case 'test_delete_non_complete_job' seems to be taking
some time anyway to capture the exception.

So just reducing the running time of the test significatanly
as we don't need to create 64LVs for 4 'execution mode' runs.

2 months agocov: ensure pointer has defined value
Zdenek Kabelac [Mon, 13 May 2024 15:29:15 +0000 (17:29 +0200)]
cov: ensure pointer has defined value

Add initialization of 'fin' pointer.

2 months agodmfilemapd: assign 0 to integer
Zdenek Kabelac [Mon, 13 May 2024 15:13:08 +0000 (17:13 +0200)]
dmfilemapd: assign 0 to integer

Avoid mixing enumeration assign with 0, so just pick some integer
from filemap_monitor,  stucture will be fully zeroed anyway....

2 months agolibdevmapper-event: correct switch break
Zdenek Kabelac [Mon, 13 May 2024 15:04:48 +0000 (17:04 +0200)]
libdevmapper-event: correct switch break

Replace 'continue' within 'switch' statement with correct break.

2 months agoman: lvmlockd: remove dash in option name 1288670615
David Teigland [Mon, 13 May 2024 14:15:42 +0000 (09:15 -0500)]
man: lvmlockd: remove dash in option name

for consistency with other man pages

2 months agolvmcmdline: check for NULL 1288518747
Zdenek Kabelac [Mon, 13 May 2024 12:49:54 +0000 (14:49 +0200)]
lvmcmdline: check for NULL

Althought this code likely never is hit with NULL, just add
check to be sure.

2 months agocov: enusure _table doesn't leak
Zdenek Kabelac [Mon, 13 May 2024 12:48:46 +0000 (14:48 +0200)]
cov: enusure _table doesn't leak

If someone would enter _table multiple times by mistatek,
there is 'teroretical' leak - although doesn't matter much
in this case...

2 months agomake: generate 1288355312
Zdenek Kabelac [Mon, 13 May 2024 10:43:05 +0000 (12:43 +0200)]
make: generate

2 months agolv_types: sort order of types
Zdenek Kabelac [Mon, 13 May 2024 10:00:59 +0000 (12:00 +0200)]
lv_types: sort order of types

Order is used for man page generation (although not completely).
So place  'zero & error' to the end of list.
Keep  linear,striped,snapshot in front.
For the rest use alphabetic order.

2 months agocleanup: local const arrays
Zdenek Kabelac [Mon, 13 May 2024 09:36:54 +0000 (11:36 +0200)]
cleanup: local const arrays

No need for relocation entries for locally used arrays.

2 months agocleanup: static missed _
Zdenek Kabelac [Mon, 13 May 2024 09:33:17 +0000 (11:33 +0200)]
cleanup: static missed _

2 months agocleanup: remove unuable code path
Zdenek Kabelac [Mon, 13 May 2024 09:21:37 +0000 (11:21 +0200)]
cleanup: remove unuable code path

Eliminate some ancient unreachable code
for historical version of libdm.

2 months agocleanup: some missed public symbols static
Zdenek Kabelac [Mon, 13 May 2024 09:18:20 +0000 (11:18 +0200)]
cleanup: some missed public symbols static

2 months agolabel: make scan_bcache local 1287637635
Zdenek Kabelac [Sun, 12 May 2024 23:49:00 +0000 (01:49 +0200)]
label: make scan_bcache local

Seems there are no users of scan_bcache, so make it local.
TODO: such variable should be ideally in cmd_context.

2 months agocleanup: drop unused declared struct
Zdenek Kabelac [Sun, 12 May 2024 23:37:27 +0000 (01:37 +0200)]
cleanup: drop unused declared struct

2 months agocleanup: use static vars
Zdenek Kabelac [Mon, 13 May 2024 00:10:08 +0000 (02:10 +0200)]
cleanup: use static vars

Drop global visibility.

This page took 0.063272 seconds and 5 git commands to generate.