1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00
Commit Graph

19274 Commits

Author SHA1 Message Date
Zdenek Kabelac
d2c6866bdb tests: vdo conversion updates 2024-05-10 01:15:55 +02:00
Zdenek Kabelac
868bd3b51e commands: move tabs to eol
Make the source code a bit easier to read.
2024-05-10 01:15:55 +02:00
Zdenek Kabelac
5aff63c07b commands: enable more options for vdo conversion
Update definitions to add support for some more VDO options
when converting volumes to be used as thin-pool with vdo data volume.

Split some option in existing OO_LVCONVERT_VDO to OO_LVCONVERT_VDO_POOL
and reused then with OO_LVCONVERT_THINPOOL.
2024-05-10 01:15:55 +02:00
Zdenek Kabelac
8a323082ef lvconvert: vdo support conversion options
When convert already existing vdopool to be used as
thin-pool backend and user is passinng option for VDO configuration
process them - as we know converted LV is offline, we can do such
change easily instead of telling user to run separate lvchange later.
2024-05-10 01:15:55 +02:00
Zdenek Kabelac
04d9f13fa6 lvconvert: vdo control for signature wiping
When converting volumes to be used for thin-pool with VDO, allow
users to control wipesingature behaviour.
By default volumes should be checked against signature, and if
they are present, we promt user whether he wants to process with
conversion and lose i.e. filesystem present on such volume.

Users that want to bypass prompt in script can use either --yes
or they can disable wipe signature -Wn.
2024-05-10 01:15:55 +02:00
David Teigland
298bd24e53 man: lvmthin more extend options 2024-05-08 10:30:05 -05:00
Zdenek Kabelac
7a74229a8e tests: runner updates line with last timestamp 2024-05-08 16:14:58 +02:00
Zdenek Kabelac
a3dcdf5671 clean: use struct initializer 2024-05-08 16:14:58 +02:00
Zdenek Kabelac
6db19f6b51 dmsetup: const string_args array
Convert _string_args to const char*.
Do not modify options read from getopt().
2024-05-08 16:13:11 +02:00
Zdenek Kabelac
57143a216e dmsetup: use tab for indent
Use \t for help indention.
2024-05-08 16:12:41 +02:00
Zdenek Kabelac
7c016506a2 dmsetup: more const strings
More strings into .rodata segment.
2024-05-08 16:12:07 +02:00
Zdenek Kabelac
5561f2a530 dmsetup: reduce parser code
Switch set upfront.
Only add code, which is not common for every switch.
Use just 16bit for switch counting.
2024-05-08 16:10:52 +02:00
Zdenek Kabelac
2f3fcbd245 libdm: fix invalid conversion
Previous commit missed to also add one to added 'len'.
2024-05-08 10:16:01 +02:00
Zdenek Kabelac
4dda6d1555 libdm: stats uses overflowing counter
Here we need to annotate counter as it starts with UINT64_MAX
and overflows to 0 is expected.
2024-05-08 10:14:52 +02:00
Zdenek Kabelac
8168b5e71d clenaup: update local static with _ 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
c48cc22b18 const: tests 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
edbc0ed447 man-generator: remove unused declarations 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
383d7c4413 cov: remove dead code 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
cfcbf89ed0 cov: eliminate dead code
Deduplicate code and also drop some warn about dead code.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
09f70dbb87 cov: avoid TOCTOU
Use just opendir() call and produce error message from errno state.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
5f1c799e6a cov: enum mapping cache format
Cleanly map cache metadata format enumeration.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
f0d3d0482e cov: enum health status
Cleanly map health char status to enum.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
5818fbfbcf cov: enum matching type 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
3e91823b3e cov: enum correct prototype
Cleanup enum usage.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
59b4c97564 cov: cast to matching prototype
Match function prototype with casting.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
3f41b4af55 cov: check for overlow math
Add some extre protection to avoid integer overflow type of problems.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
5c7d6083a9 cov: annotate to silent some coverity warning 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
bbf352892d cov: use literal for printf
Use literal for printf and just empty string if needed.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
d7c2fe9723 cov: use literal for printf format
Prepare suffix ahead and use literal for printf().
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
f6e0e7b9aa cov: sanitize input buffer
Make coverity aware the input line is legit.
Eventually add more sanitize functionality.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
9f4dc4170b cov: sanitize string for file path 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
a07bf7b90b 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.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
dae792baad cov: strcpy mempcy 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
db40a2e33c cov: replace strcat with safe snprintf 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
4761753a6f cov: replace strcpy with memcpy 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
04b407674c cov: use sscanf buffer size limits
String parsing with buffer size limit.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
61a11f25a3 cov: check for valid raid0 LV segment
Add internal error to quiet Coverity fear of NULL pointer deref.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
099a4e2146 raid: easier prompt message
Use  printf capability of 'prompt()' funtions so use literal
when building this message.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
91991e3cc1 lvmlockd-dlm: log_error message with literal
Use literals for printf() message construction.
2024-05-08 01:55:21 +02:00
Zdenek Kabelac
e56e7ed533 libdm: unlink checks for ENOENT 2024-05-08 01:55:21 +02:00
Zdenek Kabelac
a763420786 libdm: use literal for error message
Use literals for printf messages.
2024-05-08 01:55:20 +02:00
Zdenek Kabelac
75a03c2c26 const: daemon server logging backend struct 2024-05-08 01:55:20 +02:00
Zdenek Kabelac
495ea0f058 const: lvmpolld long_options
Rework usage of long_options so it can be constified,
and also correct use of 'enum action_index'.
2024-05-08 01:55:20 +02:00
Zdenek Kabelac
c140601cf6 const: rework conversion to enum
Easier code with string and also avoids mixing enums.
2024-05-08 01:55:20 +02:00
Zdenek Kabelac
5d573cc91d const: array of const values 2024-05-08 01:55:20 +02:00
Zdenek Kabelac
7b872bc4cd const: libdm err_fmt as string 2024-05-08 01:55:20 +02:00
David Teigland
2a75dc7465 man: lvmthin update
major refresh of text and organization
2024-05-06 12:17:13 -05:00
Zdenek Kabelac
09426b4663 dmsetup: fix invalid loop test
Last patcheds had incorrect merging bug - fix loop test.
2024-05-04 01:53:54 +02:00
Zdenek Kabelac
d16a8f80e9 Revert "libdm: fix condition"
This reverts commit 2a1e200f7a.

Breaks some test - more analysis is needed.
2024-05-04 01:37:51 +02:00
Zdenek Kabelac
f3d3d4a07d WHATS_NEW: update 2024-05-04 01:02:31 +02:00