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

16897 Commits

Author SHA1 Message Date
David Teigland
ed249a2c53 integrity: report mismatches
with lvs -o integritymismatches

reported for integrity images, which may report
different values
2020-09-01 17:13:21 -05:00
David Teigland
47b5fb138c integrity: report raidintegritymode randintegrityblocksize
reported for the raid lv and the integrity images
2020-09-01 17:12:36 -05:00
David Teigland
f2c1de783c integrity: always default to journal mode
lvconvert was defaulting to bitmap mode,
and lvcreate was defaulting to journal mode.
2020-09-01 17:12:28 -05:00
Zdenek Kabelac
9a06700017 tests: skip this test for current 5.8 5.9 kernels
Kernel is hitting not yet fixed kernel bug.
Skip the test to avoid killing testing machine.
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
fa1290f40e tests: slightly faster
Use lvm shell to agregrate lots of lvm commands
Reduce initial zeroing.
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
38d460ed6e tests: set skipping autoactivation
On test system with 'default' filter  (aka accept all) test
after enabling device can suffer from automatic system
activation - so for created LVs setup skipping this automatic
activation. This should prevent getting LVs into table
with pvscan service.
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
ada5728c72 tests: skip test when gcore cannot catch securetest 2020-09-01 23:40:24 +02:00
Zdenek Kabelac
bc13c7d246 gcc: avoid shadowing of dev_name and pvs
Since we declare dev_name in lib/device/device.h
and pvs in commands.h
rename local dev_name to device_name
and pvs to pvs_list to prevent shadowing warning.

m
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
672d5ad98b gcc: hide warn about possible uninitialized use of dev_ret
Older gcc reports this fp problem.
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
11f08dacc9 pvck: add simple check for fwrite
Add at least very light check for result code of fwrite().
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
66803586ef pvck: use array of bytes
Fix typo in use array of pointers instead of array of bytes.
This fixes 'break strict-aliasing rules' warning printed with older gcc.
2020-09-01 23:40:24 +02:00
Zdenek Kabelac
1ff1e86deb cleanup: better expressing passing key arg to _hash 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
4baedfc578 cleanup: add spaces between literals 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
a375657092 cleanup: user force_t enums instead of ints 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
dbb19f6ace cleanup: matching declaration order
Cosmetic
2020-09-01 17:57:50 +02:00
Zdenek Kabelac
56c41b7522 cov: avoid duplicated assign 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
a481f42630 cov: always initialized values
Make sure values are initialized for all possible paths.
2020-09-01 17:57:50 +02:00
Zdenek Kabelac
85e2c7e14d cov: explicitely ignore function result 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
1705b439b1 cov: always sure we end with '0'
Use easier dm_strncpy().
2020-09-01 17:57:50 +02:00
Zdenek Kabelac
de837c15a5 gcc: keep using unsigned type 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
534760398c gcc: preserve constness of buffer 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
fd96f1014b gcc: zero-sized array to fexlible array C99
Switch remaining zero sized struct to flexible arrays to be C99
complient.

These simple rules should apply:

- The incomplete array type must be the last element within the structure.
- There cannot be an array of structures that contain a flexible array member.
- Structures that contain a flexible array member cannot be used as a member of another structure.
- The structure must contain at least one named member in addition to the flexible array member.

Although some of the code pieces should be still improved.
2020-09-01 17:57:50 +02:00
Zhao Heming
cc2218b401 gcc: change zero-sized array to fexlible array
this patch makes gcc happy with compiling option: [-Wstringop-overflow=]

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
2020-09-01 17:57:50 +02:00
Zdenek Kabelac
0f377a04e5 dmsetup: initilize winsize struct
Ensure winsize struct is always defined.
2020-09-01 17:57:50 +02:00
Zdenek Kabelac
2fbc578cfa tests: filefrag needs to support -e
Skip on systems with 'too old' filefrag without -e support
2020-09-01 17:57:48 +02:00
Zdenek Kabelac
ef389603dd cachevol: correcting 64b math
Widen to 64bit for correct 64b multiplication math.
2020-09-01 17:50:48 +02:00
Zdenek Kabelac
f0614e7cf0 WHATS_NEW: update 2020-08-28 21:43:03 +02:00
Zdenek Kabelac
b722ce2f10 gcc: drop bogus ; 2020-08-28 21:43:03 +02:00
Zdenek Kabelac
19e9c88faf gcc: do not use return with void function
Follow C norm and do not use 'return' in void function to call other
functions.
2020-08-28 21:43:03 +02:00
Zdenek Kabelac
ee0cb17608 gcc: use apropriate type for reading and printing values 2020-08-28 21:43:03 +02:00
Zdenek Kabelac
b918afb693 tools: move struct element before variable lenght list
Move prio field before 'variable' struct array field.
Interesting why this has not been catched yet.

TODO: think about test case
2020-08-28 21:43:02 +02:00
Zdenek Kabelac
7880896f0d gcc: calc size in compile time 2020-08-28 21:43:02 +02:00
Zdenek Kabelac
fd8d926fc5 gcc: avoid stack alloc arithmetic 2020-08-28 21:43:02 +02:00
Zdenek Kabelac
ce202c3b1c gcc: keep unsigned arithmetic
Avoid conversion to int.
2020-08-28 21:43:02 +02:00
Zdenek Kabelac
ff4827ffb1 lv_manip: get_default_region_size return uint32_t 2020-08-28 21:43:02 +02:00
Zdenek Kabelac
93c9055591 lvmcache: use uint32_t for seqno caching 2020-08-28 21:43:02 +02:00
Zdenek Kabelac
03f9cd95b4 writecache: correct usage of const struct 2020-08-28 21:43:02 +02:00
Zdenek Kabelac
fb7a3fe8d6 container_of: drop needless const converion 2020-08-28 21:43:02 +02:00
Zdenek Kabelac
ca54afd701 tests: check we detect lvm.conf read failure
No coredumps with unreadable lvm.conf.
2020-08-28 21:43:02 +02:00
Zdenek Kabelac
e3e04b99f2 config: drop reading file with mmap
While normally the 'mmap' file reading is better utilizing resources,
it has also its odd side with handling errors - so while we normally
use the mmap only for reading regular files from root filesystem
(i.e. lvm.conf) we can't prevent error to happen during the read
of these file - and such error unfortunately ends with SIGBUS error.
Maintaing signal handler would be compilated - so switch to slightly
less effiecient but more error resistant read() functinality.
2020-08-28 21:43:02 +02:00
David Teigland
9a88a9c4ce Revert "lvdisplay: dispaly correct status when underlying devs missing"
This reverts commit 1d0dc74f91.

We should avoid adding anything new to lvdisplay and report
new information via lvs reporting fields.
2020-08-28 13:28:15 -05:00
Zhao Heming
1d0dc74f91 lvdisplay: dispaly correct status when underlying devs missing
reproducible steps:
1. vgcreate vg1 /dev/sda /dev/sdb
2. lvcreate --type raid0 -l 100%FREE -n raid0lv vg1
3. do remove the /dev/sdb action
4. lvdisplay show wrong 'LV Status'

After removing raid0 type LV underlying dev, lvdisplay still display
'available'. This is wrong status for raid0.

This patch add a new function raid_is_available(), which will handle
all raid case.

With this patch, lvdisplay will show
from:
  LV Status              available
to:
  LV Status              NOT available (partial)

Reviewed-by: Enzo Matsumiya <ematsumiya@suse.com>
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
2020-08-24 09:47:04 -05:00
Zdenek Kabelac
46d15b5e4d wipe_lv: close devices on error path
Device was kept open preventing its deactivated and removed
on error path.
2020-08-19 15:09:09 +02:00
Zdenek Kabelac
3e9664baca man: vdo improvals
Add some more notes about discard.
Correct enumeration.
2020-08-19 15:09:09 +02:00
Zdenek Kabelac
7b41ea61b2 config: move some config setting into commented part
It's better to set most of option as 'commented' with some
documented defaults instead of providing strict values.

This has the advantage we can eventually 'change' defualts
and get them working in future. Otherwise once the setting
is stored in lvm.conf in /etc, such setting has strictly
defined value and that can be only change with file update.
2020-08-19 15:07:09 +02:00
Marian Csontos
135d16fbb8 Update README 2020-08-12 12:05:36 +02:00
Marian Csontos
231cdd0efb post-release 2020-08-09 16:17:15 +02:00
Marian Csontos
4d9f0606be pre-release 2020-08-09 16:17:15 +02:00
Marian Csontos
c1d136fea3 WHATS_NEW 2020-08-09 16:17:15 +02:00
Marian Csontos
9f8c331760 build: make generate 2020-08-09 15:20:22 +02:00