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

16744 Commits

Author SHA1 Message Date
Zdenek Kabelac
b3fa71fbd8 libdm: fix dm_list pointer arithmentic for new gcc 10 optimization 2020-03-05 17:38:55 +01:00
Zdenek Kabelac
212cf8efbd dmeventd: enhance time waiting loop
dmeventd is 'scanning' statuses in loop (most usually in 10sec
intervals) - and meanwhile it sleeps within:
pthread_cond_timedwait()

However this function call tends to wakeup sometimes a short amount of
time sooner - and our code still believe the 'right time' has not yet
arrived and basically for a moment 'busy-looped' on calling this
function - so for systems with 'clock_gettime()' present we obtain
time and we go 10ms to the future second - this avoids unneeded
repeated invocation of our time scheduling loop.

TODO: monitoring during 1 hour 'time-change'...
2020-03-05 17:38:55 +01:00
David Teigland
caecbcbeac pvck: use dm_config_parse_without_dup_node_check
instead of dm_config_parse.  Some strange case could
cause dm_config_parse to print duplicate warnings about
all the metadata fileds.
2020-03-04 11:32:13 -06:00
David Teigland
4b5bfa779a tests: reduce sizes in pvck-dump and improve checks
Smaller devs can be used so tests can be run on small vms.
Improve checks.
2020-03-04 11:30:50 -06:00
David Teigland
f6667f94cb tests: pvck dump from larger metadata areas 2020-03-03 13:47:07 -06:00
David Teigland
1b711b955d pvck: allow dump from file 2020-03-03 13:47:07 -06:00
David Teigland
f140620043 pvck: fix reading large mda1
When mda_size is larger than io_memory_size, reading
the entire mda fails unless the previous read of the
label has been invalidated.
2020-03-03 13:47:07 -06:00
David Teigland
c6746181a3 pvck: improve mda_offset mda_size choices
Attempt to calculate an offset or size if one only
value was specified in the settings.

Use header values when available.
2020-03-03 13:47:07 -06:00
David Teigland
1b79673845 pvck: print longer command description 2020-03-03 13:47:07 -06:00
David Teigland
b19b7b6111 pvck: ensure text lines are terminated 2020-03-03 13:47:07 -06:00
David Teigland
f50e7ce76c hints: free hint list in error exit path 2020-03-03 12:25:34 -06:00
Jonathan Brassow
c392ccaa47 man: lvmcache raid1 references 2020-02-27 11:33:55 -06:00
Zdenek Kabelac
9532bb577a tests: validate vdo slab_size
New vdoformat can print this size - so check we pass proper bit count
matching preset value.
2020-02-26 13:29:21 +01:00
Zdenek Kabelac
d02d7bc560 vdo: fix slab size bits calculation
When formating VDO volume, the calculated amound of bits
for 'vdoformat --slab-bits' parameter was shifted by 2 bits
(calculated size was making 2MiB vdo_slab_size_mb value appear like if
user would be specifying only 512KiB)

Fixed by properly converting internal size_mb value to KiB.
2020-02-25 17:43:16 +01:00
David Teigland
84eab461c8 writecache: check watermark value 2020-02-25 10:34:30 -06:00
David Teigland
81d0333067 writecache: allow removing wcorig lv
like removing corig
2020-02-21 12:41:52 -06:00
David Teigland
2284f845b0 writecache: fix watermark error message 2020-02-21 08:13:32 -06:00
David Teigland
8153c5f1e6 writecache: working real dm uuid suffix for wcorig lv 2020-02-20 17:13:43 -06:00
David Teigland
4829f27b76 writecache: drop real dm suffix
fixes the problem of adding writecache to an active LV
2020-02-17 13:07:06 -06:00
David Teigland
db1d66859f thin: don't use writecache for poolmetadata 2020-02-13 17:22:37 -06:00
David Teigland
cba06012ac writecache: check if cachevol is writable
before trying to initialize it (since wipe_lv
does not return an error if it fails to write.)
2020-02-11 13:01:13 -06:00
Zdenek Kabelac
892a182975 cachevol: stop dm errors with uncaching cache with cachevol
Fix the anoying kernel message reported:
device-mapper: cache: 253:2: metadata operation 'dm_cache_commit' failed: error = -5
which has been reported while cachevol has been removed.
Happened via confusing variable - so switch the variable to commonly user '_size'
which presents a value in sector units and avoid 'scaling' this as extent length
by vg extent size when placing 'error' target on removal path.

Patch shouldn't have impact on actual users data, since at this moment
of removal all date should have been already flushed to origin device.

m
2020-02-11 17:19:57 +01:00
Marian Csontos
25b97e522d post-release 2020-02-11 10:53:01 +01:00
Marian Csontos
b9752d719c pre-release 2020-02-11 10:51:57 +01:00
Zdenek Kabelac
3716aa848e vdo: fix vdoformat when -V is specified
The previous patch improved read of pipe when lvm2 was looking
for default logical size, but we clearly must read pipe also
for -V case, when the logical size is already defined.
2020-02-10 15:41:30 +01:00
David Teigland
8f794f2095 writecache: skip zeroing in test mode 2020-02-07 10:32:10 -06:00
David Teigland
744b75f881 writecache: check for invalid cachevol 2020-02-07 10:26:59 -06:00
David Teigland
b756cb3e49 writecache: fix return value 2020-02-07 10:21:07 -06:00
Zdenek Kabelac
96985b1373 raid: better place for blocking reshapes
Still the place can be better to block only particular reshape
operations which ATM cause kernel problems.

We check if the new number of images is higher - and prevent to take
conversion if the volume is in use (i.e. thin-pool's data LV).
2020-02-07 16:48:48 +01:00
David Teigland
ffea7daec3 writecache: prevent snapshots
there appear to be problems with taking a snapshot
of an LV with a writecache, so block it until that
is understood or fixed.
2020-02-06 11:27:33 -06:00
David Teigland
2a6078f961 writecache: fix splitcache when origin is raid 2020-02-04 16:12:09 -06:00
Zdenek Kabelac
9255c7148a WHATS_NEW: update 2020-02-04 17:22:06 +01:00
Zdenek Kabelac
aa7642a444 generate: remake
Regen man page.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
336361b2f2 lv_manip: add extra check for existin origin_lv
clang: it's supposedly impossible path to hit, as we should always
have origin_lv defined when running this path, but adding protection
isn't a big issue to make this obvious to analyzer.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
67f627c8fb raid: add internal error for no segment
clang: capture internal error when data_seg would not be defined.
(invalid LV with no areas)
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
409362c127 lv_manip: add error handling for _reserve_area
Since _reserve_area() may fail due to error allocation failure,
add support to report this already reported failure upward.

FIXME: it's log_error() without causing direct command failure.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
e6a3c09017 command: validate reporting of previous argument
When reporting parsing error, report 'previous' argument
only when there is one.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
4791d0f035 dmeventd: nicer error path for reading pipe
When _daemon_read()/_client_read() fails during the read,
ensure memory allocated withing function is also release here
(so caller does not need to care). Also improve code readbility a bit
a for same functionality use more similar code.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
91d16fc049 lvmlockctl: use inline initilizers
clang: ensure r_name[] is in all possible paths defined.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
d01f27f411 lvmlockctl: ensure result value is always defined
Ensure passed pointer gets predefined value (instead of random stack
value).
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
bcfe4993e5 lvmlockd: move eval of ENOENT
To avoid logging 'errors' for no real error state (ENOENT),
move this evaluation upward in the code.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
555d6d4e62 cov: check error code from mutex init 2020-02-04 17:22:06 +01:00
Zdenek Kabelac
d6ac039b65 cov: widen before calculating min_chunk_size
Although we expect min_chunk_size to be 32bit value, for
large size of caches it might be useful to do calcs 64bit.
So to avoid doing shift as signed 32bit - use unsigned 64bit
from the start.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
de43527f94 cov: unused header file removal
cov: unused header removed
Also ensure library header file with config settings goes first.
Move inclusion of format-text.h into layout.h
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
c5e5ae4c95 bcache: fix memleak on error path
clang: free io on error path.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
1bde35e596 pvck: avoid memleak of vgname
clang: no vgname buffer leak.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
ac38b576f9 dmsetup: no memleak on failed realocation
clang: keep old buf pointer for release on failing realloc() codepath.
2020-02-04 17:22:06 +01:00
Zdenek Kabelac
62ad12d0d0 tests: compatible with older kernels
Older kernels just show syscall stacktrace.
2020-02-04 17:22:06 +01:00
David Teigland
c0de37ab18 tests: move vgsplit writecache
to a different file
2020-02-04 10:20:19 -06:00
David Teigland
c1ee6f0eef pvmove: prevent moving writecache device 2020-02-03 15:59:12 -06:00