]> sourceware.org Git - lvm2.git/log
lvm2.git
4 months agoman: lvmthin more extend options 1283484574
David Teigland [Wed, 8 May 2024 15:29:22 +0000 (10:29 -0500)]
man: lvmthin more extend options

4 months agotests: runner updates line with last timestamp 1283405129
Zdenek Kabelac [Wed, 8 May 2024 14:02:44 +0000 (16:02 +0200)]
tests: runner updates line with last timestamp

4 months agoclean: use struct initializer
Zdenek Kabelac [Wed, 8 May 2024 12:24:21 +0000 (14:24 +0200)]
clean: use struct initializer

4 months agodmsetup: const string_args array
Zdenek Kabelac [Wed, 8 May 2024 12:35:20 +0000 (14:35 +0200)]
dmsetup: const string_args array

Convert _string_args to const char*.
Do not modify options read from getopt().

4 months agodmsetup: use tab for indent
Zdenek Kabelac [Wed, 8 May 2024 12:19:17 +0000 (14:19 +0200)]
dmsetup: use tab for indent

Use \t for help indention.

4 months agodmsetup: more const strings
Zdenek Kabelac [Wed, 8 May 2024 12:14:27 +0000 (14:14 +0200)]
dmsetup: more const strings

More strings into .rodata segment.

4 months agodmsetup: reduce parser code
Zdenek Kabelac [Wed, 8 May 2024 12:04:12 +0000 (14:04 +0200)]
dmsetup: reduce parser code

Switch set upfront.
Only add code, which is not common for every switch.
Use just 16bit for switch counting.

4 months agolibdm: fix invalid conversion 1282874709
Zdenek Kabelac [Wed, 8 May 2024 07:54:30 +0000 (09:54 +0200)]
libdm: fix invalid conversion

Previous commit missed to also add one to added 'len'.

4 months agolibdm: stats uses overflowing counter
Zdenek Kabelac [Wed, 8 May 2024 07:36:39 +0000 (09:36 +0200)]
libdm: stats uses overflowing counter

Here we need to annotate counter as it starts with UINT64_MAX
and overflows to 0 is expected.

4 months agoclenaup: update local static with _ 1282494242
Zdenek Kabelac [Tue, 7 May 2024 23:15:33 +0000 (01:15 +0200)]
clenaup: update local static with _

4 months agoconst: tests
Zdenek Kabelac [Tue, 7 May 2024 20:06:35 +0000 (22:06 +0200)]
const: tests

4 months agoman-generator: remove unused declarations
Zdenek Kabelac [Mon, 6 May 2024 21:56:47 +0000 (23:56 +0200)]
man-generator: remove unused declarations

4 months agocov: remove dead code
Zdenek Kabelac [Tue, 7 May 2024 13:25:32 +0000 (15:25 +0200)]
cov: remove dead code

4 months agocov: eliminate dead code
Zdenek Kabelac [Tue, 7 May 2024 13:21:19 +0000 (15:21 +0200)]
cov: eliminate dead code

Deduplicate code and also drop some warn about dead code.

4 months agocov: avoid TOCTOU
Zdenek Kabelac [Tue, 7 May 2024 12:48:55 +0000 (14:48 +0200)]
cov: avoid TOCTOU

Use just opendir() call and produce error message from errno state.

4 months agocov: enum mapping cache format
Zdenek Kabelac [Tue, 7 May 2024 15:19:55 +0000 (17:19 +0200)]
cov: enum mapping cache format

Cleanly map cache metadata format enumeration.

4 months agocov: enum health status
Zdenek Kabelac [Tue, 7 May 2024 14:33:03 +0000 (16:33 +0200)]
cov: enum health status

Cleanly map health char status to enum.

4 months agocov: enum matching type
Zdenek Kabelac [Tue, 7 May 2024 14:27:08 +0000 (16:27 +0200)]
cov: enum matching type

4 months agocov: enum correct prototype
Zdenek Kabelac [Tue, 7 May 2024 11:58:21 +0000 (13:58 +0200)]
cov: enum correct prototype

Cleanup enum usage.

4 months agocov: cast to matching prototype
Zdenek Kabelac [Tue, 7 May 2024 11:38:10 +0000 (13:38 +0200)]
cov: cast to matching prototype

Match function prototype with casting.

4 months agocov: check for overlow math
Zdenek Kabelac [Tue, 7 May 2024 11:24:01 +0000 (13:24 +0200)]
cov: check for overlow math

Add some extre protection to avoid integer overflow type of problems.

4 months agocov: annotate to silent some coverity warning
Zdenek Kabelac [Mon, 6 May 2024 21:59:59 +0000 (23:59 +0200)]
cov: annotate to silent some coverity warning

4 months agocov: use literal for printf
Zdenek Kabelac [Mon, 6 May 2024 20:46:09 +0000 (22:46 +0200)]
cov: use literal for printf

Use literal for printf and just empty string if needed.

4 months agocov: use literal for printf format
Zdenek Kabelac [Mon, 6 May 2024 20:41:58 +0000 (22:41 +0200)]
cov: use literal for printf format

Prepare suffix ahead and use literal for printf().

4 months agocov: sanitize input buffer
Zdenek Kabelac [Tue, 7 May 2024 22:00:28 +0000 (00:00 +0200)]
cov: sanitize input buffer

Make coverity aware the input line is legit.
Eventually add more sanitize functionality.

4 months agocov: sanitize string for file path
Zdenek Kabelac [Mon, 6 May 2024 20:26:31 +0000 (22:26 +0200)]
cov: sanitize string for file path

4 months agocov: wrap pvck call
Zdenek Kabelac [Sat, 4 May 2024 21:07:45 +0000 (23:07 +0200)]
cov: wrap pvck call

Resolve reported leak by renaming existing pckk() to pvck_mf()
and wrapping pvck() over this. This function can easily
free allocated buffer within the subfunction.

4 months agocov: strcpy mempcy
Zdenek Kabelac [Sat, 4 May 2024 20:31:21 +0000 (22:31 +0200)]
cov: strcpy mempcy

4 months agocov: replace strcat with safe snprintf
Zdenek Kabelac [Sat, 4 May 2024 20:00:51 +0000 (22:00 +0200)]
cov: replace strcat with safe snprintf

4 months agocov: replace strcpy with memcpy
Zdenek Kabelac [Sat, 4 May 2024 19:56:34 +0000 (21:56 +0200)]
cov: replace strcpy with memcpy

4 months agocov: use sscanf buffer size limits
Zdenek Kabelac [Sat, 4 May 2024 19:14:41 +0000 (21:14 +0200)]
cov: use sscanf buffer size limits

String parsing with buffer size limit.

4 months agocov: check for valid raid0 LV segment
Zdenek Kabelac [Sat, 4 May 2024 10:38:13 +0000 (12:38 +0200)]
cov: check for valid raid0 LV segment

Add internal error to quiet Coverity fear of NULL pointer deref.

4 months agoraid: easier prompt message
Zdenek Kabelac [Sat, 4 May 2024 18:30:10 +0000 (20:30 +0200)]
raid: easier prompt message

Use  printf capability of 'prompt()' funtions so use literal
when building this message.

4 months agolvmlockd-dlm: log_error message with literal
Zdenek Kabelac [Sat, 4 May 2024 10:25:36 +0000 (12:25 +0200)]
lvmlockd-dlm: log_error message with literal

Use literals for printf() message construction.

4 months agolibdm: unlink checks for ENOENT
Zdenek Kabelac [Tue, 7 May 2024 20:34:17 +0000 (22:34 +0200)]
libdm: unlink checks for ENOENT

4 months agolibdm: use literal for error message
Zdenek Kabelac [Sat, 4 May 2024 09:30:50 +0000 (11:30 +0200)]
libdm: use literal for error message

Use literals for printf messages.

4 months agoconst: daemon server logging backend struct
Zdenek Kabelac [Tue, 7 May 2024 18:41:40 +0000 (20:41 +0200)]
const: daemon server logging backend struct

4 months agoconst: lvmpolld long_options
Zdenek Kabelac [Tue, 7 May 2024 14:55:24 +0000 (16:55 +0200)]
const: lvmpolld long_options

Rework usage of long_options so it can be constified,
and also correct use of 'enum action_index'.

4 months agoconst: rework conversion to enum
Zdenek Kabelac [Sat, 4 May 2024 09:25:58 +0000 (11:25 +0200)]
const: rework conversion to enum

Easier code with string and also avoids mixing enums.

4 months agoconst: array of const values
Zdenek Kabelac [Sat, 4 May 2024 09:17:29 +0000 (11:17 +0200)]
const: array of const values

4 months agoconst: libdm err_fmt as string
Zdenek Kabelac [Sat, 4 May 2024 09:10:10 +0000 (11:10 +0200)]
const: libdm err_fmt as string

4 months agoman: lvmthin update 1280524941
David Teigland [Mon, 6 May 2024 17:01:52 +0000 (12:01 -0500)]
man: lvmthin update

major refresh of text and organization

4 months agodmsetup: fix invalid loop test 1278127232
Zdenek Kabelac [Fri, 3 May 2024 23:53:54 +0000 (01:53 +0200)]
dmsetup: fix invalid loop test

Last patcheds had incorrect merging bug - fix loop test.

4 months agoRevert "libdm: fix condition" 1278121961
Zdenek Kabelac [Fri, 3 May 2024 23:37:51 +0000 (01:37 +0200)]
Revert "libdm: fix condition"

This reverts commit 2a1e200f7af3d4c52afbb4627c8cf87f98baa71e.

Breaks some test - more analysis is needed.

4 months agoWHATS_NEW: update 1278107058
Zdenek Kabelac [Fri, 3 May 2024 22:49:51 +0000 (00:49 +0200)]
WHATS_NEW: update

4 months agomake: generate
Zdenek Kabelac [Fri, 3 May 2024 22:47:06 +0000 (00:47 +0200)]
make: generate

Update for --wipesignatures for lvconvert.

4 months agodmsetup: use getopt defines
Zdenek Kabelac [Fri, 3 May 2024 20:44:06 +0000 (22:44 +0200)]
dmsetup: use getopt defines

Replace 0/1 with getopts defines no/required_argument

4 months agoconst: dmsetup long_options
Zdenek Kabelac [Fri, 3 May 2024 19:28:34 +0000 (21:28 +0200)]
const: dmsetup long_options

4 months agoconst: dmsetup string
Zdenek Kabelac [Fri, 3 May 2024 15:12:23 +0000 (17:12 +0200)]
const: dmsetup string

4 months agoconst: cmirrord array
Zdenek Kabelac [Fri, 3 May 2024 18:24:29 +0000 (20:24 +0200)]
const: cmirrord array

4 months agoconst: lvmlockctl options
Zdenek Kabelac [Fri, 3 May 2024 18:17:39 +0000 (20:17 +0200)]
const: lvmlockctl options

4 months agoconst: dmfilemapd strings
Zdenek Kabelac [Fri, 3 May 2024 15:36:18 +0000 (17:36 +0200)]
const: dmfilemapd strings

4 months agoconst: array for _vdo_split
Zdenek Kabelac [Fri, 3 May 2024 14:37:27 +0000 (16:37 +0200)]
const: array for _vdo_split

4 months agoconst: report_name
Zdenek Kabelac [Fri, 3 May 2024 13:39:32 +0000 (15:39 +0200)]
const: report_name

4 months agoconst: use common error path
Zdenek Kabelac [Fri, 3 May 2024 13:18:46 +0000 (15:18 +0200)]
const: use common error path

Instead of defining  _field_selection_value_alloc_failed_msg[],
use common error path code for printing field_id.

4 months agoconst: log level string
Zdenek Kabelac [Fri, 3 May 2024 12:16:39 +0000 (14:16 +0200)]
const: log level string

4 months agoconst: libdm cmd_data_v4
Zdenek Kabelac [Fri, 3 May 2024 12:28:58 +0000 (14:28 +0200)]
const: libdm cmd_data_v4

4 months agoconst: libdm tok_op
Zdenek Kabelac [Fri, 3 May 2024 10:58:40 +0000 (12:58 +0200)]
const: libdm tok_op

4 months agoconst: suffixes list
Zdenek Kabelac [Fri, 3 May 2024 10:43:14 +0000 (12:43 +0200)]
const: suffixes list

dm_tree_set_optional_uuid_suffixes() is safe to use with overcasted
array to (const char**)

4 months agoconst: suffixes
Zdenek Kabelac [Fri, 3 May 2024 10:38:39 +0000 (12:38 +0200)]
const: suffixes

4 months agoconst: _reserved
Zdenek Kabelac [Fri, 3 May 2024 10:24:02 +0000 (12:24 +0200)]
const: _reserved

4 months agoconst: use arrays of strings 2
Zdenek Kabelac [Fri, 3 May 2024 10:50:18 +0000 (12:50 +0200)]
const: use arrays of strings 2

Next set of changes.

4 months agoconst: use arrays of strings
Zdenek Kabelac [Fri, 3 May 2024 22:25:33 +0000 (00:25 +0200)]
const: use arrays of strings

Such string is stored directly in '.rodata' section.

4 months agoconst: drop static keyword
Zdenek Kabelac [Fri, 3 May 2024 17:43:21 +0000 (19:43 +0200)]
const: drop static keyword

We don't need relocatable space to store 'const' number.

4 months agoconst: static array
Zdenek Kabelac [Fri, 3 May 2024 17:43:33 +0000 (19:43 +0200)]
const: static array

Such array can be stored  in   .rodata   section.

4 months agoconst: config items
Zdenek Kabelac [Fri, 3 May 2024 22:25:48 +0000 (00:25 +0200)]
const: config items

4 months agoconst: raid takover arrays
Zdenek Kabelac [Fri, 3 May 2024 09:35:38 +0000 (11:35 +0200)]
const: raid takover arrays

4 months agoconst: _fns poll_function
Zdenek Kabelac [Fri, 3 May 2024 12:01:59 +0000 (14:01 +0200)]
const: _fns poll_function

4 months agoconst: _ops text_vg_version
Zdenek Kabelac [Fri, 3 May 2024 12:43:22 +0000 (14:43 +0200)]
const: _ops text_vg_version

4 months agoconst: _ops labeler _text_ops
Zdenek Kabelac [Fri, 3 May 2024 13:41:02 +0000 (15:41 +0200)]
const: _ops labeler _text_ops

4 months agoconst: _ops segtype handler
Zdenek Kabelac [Fri, 3 May 2024 09:59:05 +0000 (11:59 +0200)]
const: _ops segtype handler

4 months agoconst: _ops text handler
Zdenek Kabelac [Thu, 2 May 2024 18:52:40 +0000 (20:52 +0200)]
const: _ops text handler

Making sure these structures ends in '.data.rel.ro' section.
(instead of plain '.data' section).

4 months agolibdm: fix condition
Zdenek Kabelac [Fri, 3 May 2024 19:50:38 +0000 (21:50 +0200)]
libdm: fix condition

When we switch supported_reserved_types_with_range to const
gcc repots this problem:

 warning: ‘and’ of mutually exclusive equal-tests is always 0
 !(iter->type & supported_reserved_types_with_range))) {

It's not clear from the history what was the actual intention of this
internal error test, let's assume the check wanted to make sure
that when DM_REPORT_FIELD_RESERVED_VALUE_RANGE is set,
some other fields from supported_reserved_types_with_range set
are also selected.

4 months agolibdm: ensure suffixes list elements are const
Zdenek Kabelac [Fri, 3 May 2024 21:05:40 +0000 (23:05 +0200)]
libdm: ensure suffixes list elements are const

This was rather API mistake - the internal of libdm
do handle suffixes list as const string, just the API
was only using  'const char **'.

So the user may pass safely casted 'const char * const`.

4 months agolvonvert: support control over wipingsignature
Zdenek Kabelac [Fri, 3 May 2024 22:46:45 +0000 (00:46 +0200)]
lvonvert: support control over wipingsignature

When converting volume to a thin-pool allow control over
signature wiping.

TODO: likely should become more commonly supported option...

4 months agovdo: enhance error path
Zdenek Kabelac [Fri, 3 May 2024 19:12:45 +0000 (21:12 +0200)]
vdo: enhance error path

When the conversion to VDO fails, try to restore previous VG state
and also remove orphan DM node from table.

4 months agolvcreate: --yes option for thin-pool vdo creation
Zdenek Kabelac [Fri, 3 May 2024 14:16:16 +0000 (16:16 +0200)]
lvcreate: --yes option for thin-pool vdo creation

Correct typo and accept proper --yes option instead
of misplaced --force option.

4 months agocommand: correct lvresize 1275919999
Zdenek Kabelac [Thu, 2 May 2024 11:18:08 +0000 (13:18 +0200)]
command: correct lvresize

Code for supporting size reduction of pool metadata is not yet present
so don't pretend the option can work as pushed in previous commit.

4 months agoWHATS_NEW: update 1275823809
Zdenek Kabelac [Thu, 2 May 2024 10:07:47 +0000 (12:07 +0200)]
WHATS_NEW: update

4 months agomake: generate
Zdenek Kabelac [Wed, 1 May 2024 21:24:20 +0000 (23:24 +0200)]
make: generate

Update lvresize options with +/-.

4 months agocommand-lines: improve spec for thin snapshot
Zdenek Kabelac [Thu, 2 May 2024 09:11:53 +0000 (11:11 +0200)]
command-lines: improve spec for thin snapshot

man-generate --check actually noticed 2 same definitions
for snapshot create  with 'lvreate -T [--snapshot]'
and 'lvcreate --snapshot [-T]'.
So drop the '-T' from second alternative variant as
thin type is already implied here.

4 months agouse LVM_COMMAND_COUNT
Zdenek Kabelac [Wed, 1 May 2024 23:31:51 +0000 (01:31 +0200)]
use LVM_COMMAND_COUNT

4 months agoman-generator: code reformating
Zdenek Kabelac [Wed, 1 May 2024 20:55:23 +0000 (22:55 +0200)]
man-generator: code reformating

4 months agocommand: refactor to use const command structure
Zdenek Kabelac [Wed, 1 May 2024 12:36:28 +0000 (14:36 +0200)]
command: refactor to use const command structure

Refactor code so the definitions may become 'static const'
and with configure_command_option_values() we update options
val_enum for actually running command option when used.

Also update _update_relative_opt() which is used for
generating man pages and command help.

Introduce enumeration for lvm2 commands - so we may
use enum cmd_COMMAND instead of string checking.

So running command now does not modified opt_names.

4 months agocommand: embedding strings to structs
Zdenek Kabelac [Wed, 1 May 2024 10:45:10 +0000 (12:45 +0200)]
command: embedding strings to structs

Since we will make these struct const, we can also
embedding string content into them to avoid unnecessary
pointer relocations.

4 months agocleanup: tab indent and typo
Zdenek Kabelac [Tue, 30 Apr 2024 11:49:45 +0000 (13:49 +0200)]
cleanup: tab indent and typo

4 months agocleanup: unlink passes with ENOENT
Zdenek Kabelac [Tue, 30 Apr 2024 11:48:01 +0000 (13:48 +0200)]
cleanup: unlink passes with ENOENT

4 months agocleanup: remove unused code
Zdenek Kabelac [Tue, 30 Apr 2024 11:43:32 +0000 (13:43 +0200)]
cleanup: remove unused code

4 months agowritecache: reuse some API
Zdenek Kabelac [Wed, 1 May 2024 08:41:18 +0000 (10:41 +0200)]
writecache: reuse some API

Tiny code updates, reuse dm_pool_strdup().

4 months agomemory: compile with VALGRIND_POOL
Zdenek Kabelac [Tue, 30 Apr 2024 18:55:16 +0000 (20:55 +0200)]
memory: compile with VALGRIND_POOL

Function to _allocate_memory() was not compiled-in when lvm2 was
build with support for better tracking memory pool with valgrind.
Instead now correctly avoid this function only when running
withing valgrind environment.

4 months agomemory: convert log_error
Zdenek Kabelac [Tue, 30 Apr 2024 18:24:02 +0000 (20:24 +0200)]
memory: convert log_error

As the memory locking is not causing command's error - convert
error messages to warnings and debugs.

4 months agotoolcontext: introduce var for run in valgrind
Zdenek Kabelac [Tue, 30 Apr 2024 18:22:09 +0000 (20:22 +0200)]
toolcontext: introduce var for run in valgrind

4 months agoactivation: interruptible sleep when talking to dmeventd
Zdenek Kabelac [Tue, 30 Apr 2024 18:21:05 +0000 (20:21 +0200)]
activation: interruptible sleep when talking to dmeventd

4 months agocleanup: drop double _ 1270996609
Zdenek Kabelac [Sun, 28 Apr 2024 18:15:10 +0000 (20:15 +0200)]
cleanup: drop double _

4 months agolvmcmdline: code update
Zdenek Kabelac [Sun, 28 Apr 2024 20:09:05 +0000 (22:09 +0200)]
lvmcmdline: code update

4 months agocommand: more arrays keep static
Zdenek Kabelac [Sun, 28 Apr 2024 18:14:42 +0000 (20:14 +0200)]
command: more arrays keep static

4 months agocommand: more static const declaration
Zdenek Kabelac [Sun, 28 Apr 2024 17:52:26 +0000 (19:52 +0200)]
command: more static const declaration

Use static const for declared arrays.
Access to arrays through get_ functions().

4 months agocommand: use const declaration for arrays
Zdenek Kabelac [Sun, 28 Apr 2024 16:14:27 +0000 (18:14 +0200)]
command: use const declaration for arrays

4 months agocommand: refactor common code to command_enum.h
Zdenek Kabelac [Sun, 28 Apr 2024 15:59:42 +0000 (17:59 +0200)]
command: refactor common code to command_enum.h

Move shared code to command_enum.h and avoid duplicating code.

4 months agolvchange: constify option array
Zdenek Kabelac [Sat, 27 Apr 2024 18:25:30 +0000 (20:25 +0200)]
lvchange: constify option array

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