]> sourceware.org Git - lvm2.git/log
lvm2.git
6 years ago[device/bcache] more work on bcache
Joe Thornber [Tue, 6 Feb 2018 15:10:44 +0000 (15:10 +0000)]
[device/bcache] more work on bcache

6 years ago[device/bcache] More fiddling with tests
Joe Thornber [Tue, 6 Feb 2018 13:06:15 +0000 (13:06 +0000)]
[device/bcache] More fiddling with tests

6 years ago[device/bcache] add bcache_prefetch_bytes() and bcache_read_bytes()
Joe Thornber [Mon, 5 Feb 2018 16:56:56 +0000 (16:56 +0000)]
[device/bcache] add bcache_prefetch_bytes() and bcache_read_bytes()

Not tested yet.

6 years ago[device/bcache] More tests and some bug fixes
Joe Thornber [Mon, 5 Feb 2018 16:04:23 +0000 (16:04 +0000)]
[device/bcache] More tests and some bug fixes

6 years ago[build] include test/unit/Makefile rather than recursive build
Joe Thornber [Fri, 2 Feb 2018 15:39:17 +0000 (15:39 +0000)]
[build] include test/unit/Makefile rather than recursive build

FIXME: unit tests are not currently run as part of make check.

6 years ago[device/bcache] rename a unit test
Joe Thornber [Fri, 2 Feb 2018 15:38:46 +0000 (15:38 +0000)]
[device/bcache] rename a unit test

6 years ago[device/bcache] another unit test
Joe Thornber [Fri, 2 Feb 2018 14:35:11 +0000 (14:35 +0000)]
[device/bcache] another unit test

6 years ago[device/bcache] fix bug in _alloc_block
Joe Thornber [Fri, 2 Feb 2018 14:34:45 +0000 (14:34 +0000)]
[device/bcache] fix bug in _alloc_block

6 years ago[device/bcache] Add bcache_max_prefetches()
Joe Thornber [Fri, 2 Feb 2018 12:06:14 +0000 (12:06 +0000)]
[device/bcache] Add bcache_max_prefetches()

Ignore prefetches if max io is in flight.

6 years ago[device/bcache] Add a couple of invalidate methods
Joe Thornber [Fri, 2 Feb 2018 07:59:49 +0000 (07:59 +0000)]
[device/bcache] Add a couple of invalidate methods

6 years ago[device/bcache] some more work on bcache
Joe Thornber [Thu, 1 Feb 2018 14:52:43 +0000 (14:52 +0000)]
[device/bcache] some more work on bcache

6 years ago[device/bcache] stub a unit test
Joe Thornber [Thu, 1 Feb 2018 09:54:56 +0000 (09:54 +0000)]
[device/bcache] stub a unit test

6 years ago[git] Update .gitignore
Joe Thornber [Wed, 31 Jan 2018 11:35:47 +0000 (11:35 +0000)]
[git] Update .gitignore

6 years ago[unit tests] remove old unit tests that weren't built or run.
Joe Thornber [Wed, 31 Jan 2018 11:28:51 +0000 (11:28 +0000)]
[unit tests] remove old unit tests that weren't built or run.

6 years ago[build] Quieten the build down
Joe Thornber [Wed, 31 Jan 2018 10:04:17 +0000 (10:04 +0000)]
[build] Quieten the build down

It was hard to see warnings with the long command lines scrolling by so
quickly.

Use 'make V=1' if you need to see all the gritty details.

6 years ago[lib/device/bcache] Tweaks after Kabi's review
Joe Thornber [Tue, 30 Jan 2018 12:13:48 +0000 (12:13 +0000)]
[lib/device/bcache] Tweaks after Kabi's review

6 years ago[device/bcache] Initial code drop.
Joe Thornber [Tue, 30 Jan 2018 10:46:08 +0000 (10:46 +0000)]
[device/bcache] Initial code drop.

Compiles.  Not written tests yet.

6 years ago[io paths] Unpick agk's aio stuff
Joe Thornber [Fri, 20 Apr 2018 15:43:50 +0000 (10:43 -0500)]
[io paths] Unpick agk's aio stuff

6 years agotests: improve mirror_images_redundant
Zdenek Kabelac [Fri, 20 Apr 2018 08:15:14 +0000 (10:15 +0200)]
tests: improve mirror_images_redundant

Use only passed VG for lvs and avoid 1 extra uneeded use of lvs.

6 years agotests: update mirror test
Zdenek Kabelac [Fri, 20 Apr 2018 08:13:21 +0000 (10:13 +0200)]
tests: update mirror test

Since lvconvert again is able to wait on mirror synchronization,
drop 'should'.

Also add FIXME about  'lvreduce' and too big region size.

6 years agocoverity: ensure 0 end string
Zdenek Kabelac [Thu, 29 Mar 2018 17:07:31 +0000 (19:07 +0200)]
coverity: ensure 0 end string

Use dm_strncpy() to enusure string ends with '\0'.
In case uuid does not fit, report error.

6 years agocleanup: avoid compiler warn
Zdenek Kabelac [Thu, 29 Mar 2018 16:49:42 +0000 (18:49 +0200)]
cleanup: avoid compiler warn

When variable is unused...

6 years agocleanup: correcting macro wrapping
Zdenek Kabelac [Thu, 19 Apr 2018 15:35:48 +0000 (17:35 +0200)]
cleanup: correcting macro wrapping

Use proper do {} while(0) so ';' after macros are correctly
interpretted..

6 years agocleanup: enhance debug message
Zdenek Kabelac [Thu, 19 Apr 2018 10:32:01 +0000 (12:32 +0200)]
cleanup: enhance debug message

6 years agocleanup: display_lvname update message
Zdenek Kabelac [Tue, 27 Mar 2018 19:08:20 +0000 (21:08 +0200)]
cleanup: display_lvname update message

Add more display_lvname usage.
Update some error messages.
Indent.

6 years agocleanup: add _mb_ to regiosize option
Zdenek Kabelac [Wed, 18 Apr 2018 10:56:32 +0000 (12:56 +0200)]
cleanup: add _mb_ to regiosize option

Just like with others mentions default unit in function name.

6 years agocleanup: correct casting
Zdenek Kabelac [Mon, 16 Apr 2018 10:57:02 +0000 (12:57 +0200)]
cleanup: correct casting

6 years agocleanup: reorder condition
Zdenek Kabelac [Thu, 29 Mar 2018 20:53:13 +0000 (22:53 +0200)]
cleanup: reorder condition

There is no point to wait for sync for non-locally active LV.

6 years agocleanup: call uname once
Zdenek Kabelac [Tue, 27 Mar 2018 19:07:13 +0000 (21:07 +0200)]
cleanup: call uname once

Call uname() once and keep result for mirror use-case.

6 years agomirror: use vg mempool
Zdenek Kabelac [Thu, 29 Mar 2018 21:12:57 +0000 (23:12 +0200)]
mirror: use vg mempool

Use vg mempool with mirror log metadata update.

6 years agomirror: checking for mirror segtype
Zdenek Kabelac [Fri, 20 Apr 2018 08:01:28 +0000 (10:01 +0200)]
mirror: checking for mirror segtype

Checking more correctly for mirror segtype here instead of
mirrored one which can be also 'raid'.

6 years agomirror: validate region_size for mirrors
Zdenek Kabelac [Thu, 19 Apr 2018 15:38:04 +0000 (17:38 +0200)]
mirror: validate region_size for mirrors

Check for region size properties of mirror segments.

6 years agomirror: properly reload table for log init
Zdenek Kabelac [Thu, 29 Mar 2018 21:26:22 +0000 (23:26 +0200)]
mirror: properly reload table for log init

Since mirror can be stacked, we need to properly reload whole
table stack, otherwice we may mishandle devices in dm table.

6 years agomirror: block_on_error only with monitoring
Zdenek Kabelac [Thu, 29 Mar 2018 19:10:58 +0000 (21:10 +0200)]
mirror: block_on_error only with monitoring

When user configured lvm2 to NOT user monitoring, activated mirror
actually hang upon error and it's quite unusable moment.

So instead Warn those 'brave' non-monitoring users about possible
problem and activation mirror without blocking error handling.

This also makes it a bit simpler for test suite to handle trouble
cases when test is running without  dmeventd.

6 years agomirror: fix region_size for clustered VG
Zdenek Kabelac [Fri, 20 Apr 2018 08:07:42 +0000 (10:07 +0200)]
mirror: fix region_size for clustered VG

When adjusting region size for clustered VG it always needs to fit
2 full bitset into 1MB due to old limits of CPG.

This is relatively big amount of bits, but we have still limitation
for region size to fit into 32bits (0x8000000).

So for too big mirrors this operation needs to fail - so whenever
function returns now 0, it means we can't find matching region_size.

Since return 0 is now 'error' we need to also pass proper region_size
when creating pvmove mirror.

6 years agomirror: fix calcs for maximal region_size
Zdenek Kabelac [Fri, 20 Apr 2018 08:03:26 +0000 (10:03 +0200)]
mirror: fix calcs for maximal region_size

Since extent_size is no longer power_of_2 this max region size
evalution was rather producing random bitsize as a combination
of lowest bit from number of extents and extent size itself.

Correct calculation to use whole LV size and pick biggest
possible power of 2 value smaller then UINT32_MAX.

6 years agomirror: improve mirror log size estimation
Zdenek Kabelac [Fri, 20 Apr 2018 08:12:25 +0000 (10:12 +0200)]
mirror: improve mirror log size estimation

Drop mirrored mirror log limitation that applies only in very limited
use-case and actually mirrored mirror log is deprecated anyway.

So 'disk' mirror log is selecting the correct minimal size, and
bigger size is only enforced with real mirrored mirror log.

Also for mirrored mirror log we let use 'smalled' region size if needed
so if user uses  1G region size, we still keep small mirror log
with much smaller region size in this case when needed.

Also mirror log extent calculation is now properly detecting error
with too big mirrors where previosly trimmed uint32_t was applies
unintentionally.

6 years agomirror: fix 32bit size calculation
Zdenek Kabelac [Thu, 19 Apr 2018 10:29:42 +0000 (12:29 +0200)]
mirror: fix 32bit size calculation

On 32bit arch  size_t remains 4-byte wide - so size can't
get correct result for multiplication of 32bit numbers.

6 years agoactivation: add generic rule for visibility change
Zdenek Kabelac [Fri, 20 Apr 2018 09:55:22 +0000 (11:55 +0200)]
activation: add generic rule for visibility change

Whenever we make visible LV out of previously invisible one,
reload it's table - the is mandator for proper udev rule
processing as well as ensure content of dm table is correct.

TODO: this new generic rule probably make extra raid rules unnecessary.

6 years agolvconvert: drop limitation for converting lv
Zdenek Kabelac [Wed, 18 Apr 2018 10:57:17 +0000 (12:57 +0200)]
lvconvert: drop limitation for converting lv

Fixing regresion on argument acceptance where any lv can be passed
with paramaterless lvconvert which is meant to figure out needed
operation - i.e. wait for  mirror synchronization.

User has no other 'effective' method to wait for mirror getting in-sync.

6 years agothin: restore usability of thin for external origin
Zdenek Kabelac [Thu, 29 Mar 2018 16:55:09 +0000 (18:55 +0200)]
thin: restore usability of thin for external origin

With command definition it's been lost support for thin LV being
an external origin for another thinLV.

6 years agopvmove: support properly subLV locking
Zdenek Kabelac [Tue, 27 Mar 2018 19:08:40 +0000 (21:08 +0200)]
pvmove: support properly subLV locking

Since we support snapshot of mirrors, we do need to properly check
for stacked lock holder - fixes problem of pvmove in cluster
with mirrors under snapshot.

WHATS_NEW for this patch goes with 'Restore pvmove support...'

6 years agoudev: keep systemd vars on change event in 69-dm-lvm-metad.rules for systemd reload
Martin Wilck [Tue, 17 Apr 2018 09:38:12 +0000 (11:38 +0200)]
udev: keep systemd vars on change event in 69-dm-lvm-metad.rules for systemd reload

The current logic that avoids setting SYSTEMD_ALIAS and SYSTEMD_WANTS
on "change" events is flawed in the default "systemd background job"
configuration. For systemd, it's important that device properties don't
change spuriously.

If an "add" event starts lvm2-pvscan@.service for a device, and a
"change" event follows, removing SYSTEMD_ALIAS and SYSTEMD_WANTS from the
udev db, information about unit dependencies between the device and the
pvscan service can be lost in systemd, in particular if the daemon
configuration is reloaded.

Steps to reproduce problem:

- create a device with an LVM PV
- remove device
- add device (generates "add" and "change" uevents for the device)
  (at this point SYSTEMD_ALIAS and SYSTEMD_WANTS are clear in udev db)
- systemctl daemon-reload
  (systemd reloads udev db)
- vgchange -a n
- remove device

=> the lvm2-pvscan@.service for the device is still active although the
device is gone.

- add device again

=> the PV is not detected, because systemd sees the lvm2-pvscan@.service
as active and thus doesn't restart it.

The original purpose of this logic was to avoid volumes being scanned
over and over again. With systemd background jobs, that isn't necessary,
because systemd will not restart the job as long as it's active.

Signed-off-by: Martin Wilck <mwilck@suse.com>
6 years agoudev: explicit pvscan rule in 69-dm-lvm-metad.rules
Martin Wilck [Tue, 17 Apr 2018 09:32:52 +0000 (11:32 +0200)]
udev: explicit pvscan rule in 69-dm-lvm-metad.rules

Make the distinction between the cases with and without systemd
background jobs explicit in 69-dm-lvm-metad.rules rather than
substituting the rule from the Makefile. At this stage,
this improves only readibility, at the cost of one GOTO statement.

This patch introduces no functional change to the udev rules.

Signed-off-by: Martin Wilck <mwilck@suse.com>
6 years agotest: add lvcreate-raid-volume_list
Heinz Mauelshagen [Fri, 6 Apr 2018 13:25:46 +0000 (15:25 +0200)]
test: add lvcreate-raid-volume_list

Test that no (Sub)LV remnants persist if the volume group is
not listed in configuration variable activation/volume_list,
hence not activatable thus causing initialization of rmeta
SubLVs to fail.

Related: rhbz1161347

6 years agotests: shellcheck misc
Zdenek Kabelac [Fri, 23 Mar 2018 16:01:13 +0000 (17:01 +0100)]
tests: shellcheck misc

Few more minor complains from ShellCheck.

6 years agotests: shellcheck split assing
Zdenek Kabelac [Fri, 23 Mar 2018 16:03:00 +0000 (17:03 +0100)]
tests: shellcheck split assing

Keep possibly error unmasked by assign

6 years agotests: shellcheck liter
Zdenek Kabelac [Fri, 23 Mar 2018 16:02:44 +0000 (17:02 +0100)]
tests: shellcheck liter

6 years agotests: shellcheck use grep -E
Zdenek Kabelac [Fri, 23 Mar 2018 15:59:51 +0000 (16:59 +0100)]
tests: shellcheck use grep -E

Replace egrep with grep -E

6 years agotests: shellcheck prevention check
Zdenek Kabelac [Fri, 23 Mar 2018 15:58:48 +0000 (16:58 +0100)]
tests: shellcheck prevention check

Always make sure variable is set to something else the /dev/*

6 years agofsadm: shellcheck prefer explicit escaping
Zdenek Kabelac [Fri, 23 Mar 2018 14:53:36 +0000 (15:53 +0100)]
fsadm: shellcheck prefer explicit escaping

Backslash is literal in "\t". Prefer explicit escaping: "\\t".

6 years agotests: handle setting better
Zdenek Kabelac [Mon, 19 Mar 2018 18:58:53 +0000 (19:58 +0100)]
tests: handle setting better

When using 'make check...  LVM_TEST_AUX_TRACE=0'  make it behaving
like other supported VARS in use so it's like disabled.

6 years agolibdm: enhance mounted fs detection
Zdenek Kabelac [Tue, 20 Mar 2018 10:13:22 +0000 (11:13 +0100)]
libdm: enhance mounted fs detection

btrfs is using fake major:minor device numbers.
try to be smarter and detect used node via DM device name.

This shortens delays, where i.e. lvm2 is asked to deactivate
volume with mounted btrfs as such operation is not retryed
and user is informed about device being in use.

6 years agotests: update no tool test
Zdenek Kabelac [Mon, 19 Mar 2018 09:26:50 +0000 (10:26 +0100)]
tests: update no tool test

Correct testing with format 1 and mq policy.

Add testing of 'smq'

Fix testing with clvmd - where logged message is part of clvmd log
and we can only check command status.

6 years agocleanup: typo fix
Zdenek Kabelac [Mon, 19 Mar 2018 11:05:36 +0000 (12:05 +0100)]
cleanup: typo fix

6 years agocache: disallow to combine format 2 with mq
Zdenek Kabelac [Mon, 19 Mar 2018 09:23:48 +0000 (10:23 +0100)]
cache: disallow to combine format 2 with mq

Only policy 'smq' is meant to be used with format version 2.
Code used to let pass 'mq' policy also with format 2. But 'mq'
is obsoloted wth smq and kernel currently matches it. But this
is incompatible with older original mq logic - so disallow creation
of this rather useless combination.

6 years agotests: use 4k extents
Zdenek Kabelac [Sat, 17 Mar 2018 23:30:43 +0000 (00:30 +0100)]
tests: use 4k extents

Use 4K chunks since some older kernels are not capable
to create striped volumes with smaller size.

TODO: lvm2 should detect this ahead and avoid kernel
reporting "Invalid chunk".

6 years agotests: check activation of cache without cache_check
Zdenek Kabelac [Sat, 17 Mar 2018 22:26:48 +0000 (23:26 +0100)]
tests: check activation of cache without cache_check

6 years agotests: test striped COW LV
Zdenek Kabelac [Sat, 17 Mar 2018 13:26:15 +0000 (14:26 +0100)]
tests: test striped COW LV

6 years agocleanup: use zalloc
Zdenek Kabelac [Sat, 17 Mar 2018 13:14:25 +0000 (14:14 +0100)]
cleanup: use zalloc

Replace malloc() + memset()   with zalloc().

6 years agocleanup: use direct initializer
Zdenek Kabelac [Sat, 17 Mar 2018 13:13:30 +0000 (14:13 +0100)]
cleanup: use direct initializer

6 years agocoverity: drop unused local static var
Zdenek Kabelac [Sat, 17 Mar 2018 13:00:44 +0000 (14:00 +0100)]
coverity: drop unused local static var

6 years agocoverity: drop unneeded header files
Zdenek Kabelac [Sat, 17 Mar 2018 13:00:21 +0000 (14:00 +0100)]
coverity: drop unneeded header files

6 years agocoverity: move declaration out of the loop
Zdenek Kabelac [Sat, 17 Mar 2018 12:57:40 +0000 (13:57 +0100)]
coverity: move declaration out of the loop

Move declaration of count counter outside the while loop.

6 years agocoverity: make use of defined variable
Zdenek Kabelac [Sat, 17 Mar 2018 12:56:44 +0000 (13:56 +0100)]
coverity: make use of defined variable

Since we declare 'r', let's use the value for something.

6 years agocoverity: validate descriptor
Zdenek Kabelac [Sat, 17 Mar 2018 12:53:12 +0000 (13:53 +0100)]
coverity: validate descriptor

Since this function is called with 'fd == -1', but Coverity can't see
this path can't be visited with this argument, add explicit check for
valid descriptor.

6 years agocoverity: ensure lock_type is not NULL
Zdenek Kabelac [Sat, 17 Mar 2018 13:16:09 +0000 (14:16 +0100)]
coverity: ensure lock_type is not NULL

6 years agocoverity: add missing error check for str_list_add
Zdenek Kabelac [Sat, 17 Mar 2018 13:15:11 +0000 (14:15 +0100)]
coverity: add missing error check for str_list_add

Validate success.

6 years agolvconvert: accept striped LV as snapshot COW LV
Zdenek Kabelac [Sat, 17 Mar 2018 13:01:09 +0000 (14:01 +0100)]
lvconvert: accept striped LV as snapshot COW LV

Restore back acceptance of striped LV to be valid COW LV.

6 years agoraid: fix version check of target
Zdenek Kabelac [Sat, 17 Mar 2018 20:44:53 +0000 (21:44 +0100)]
raid: fix version check of target

Comparision missed to check patch level for matching minor version.
Howerver since all checked patchlevels were 0 - the fix doesn't change result.

6 years agopools: skip checks when tools are missing
Zdenek Kabelac [Sat, 17 Mar 2018 20:50:03 +0000 (21:50 +0100)]
pools: skip checks when tools are missing

If the tools for checking thin_pool or cache metadata are missing,
issue rather just a WARNING, but let the operation of activation
continue.

This has the advantage, the if user is missing those tools,
but he already started to use thinpool or cacheing, he can
access these volumes with a WARNING.

Also if the user is using too old tools i.e. for CacheV2 format
dmpd tool 0.7 is required - provide informative WARNING and
skip failure from older tool version which can't understand
new format V2.

6 years agolvcreate: remove RaidLV on creation failure
Heinz Mauelshagen [Fri, 16 Mar 2018 14:47:12 +0000 (15:47 +0100)]
lvcreate: remove RaidLV on creation failure

In case a newly created RaidLV is blacklisted using config
\"activation { volume list = [ ... ] }\" (i.e. its SubLVs stay inactive),
the metadata SubLVs can't get wiped thus failing the creation.

As a result, the RaidLV together with its SubLVs
is left behind in an inconsistent state.

Fix by removing the RaidLV and provide a hint about volume_list reasoning.

Resolves: rhbz1161347

6 years agoactivation: separate prioritized counter
Zdenek Kabelac [Thu, 15 Mar 2018 11:30:45 +0000 (12:30 +0100)]
activation: separate prioritized counter

While prioritized_section() based on raised priority works
nicely for standard lvm comman - separate counter is actually needed
when it's used in daemons like clvmd/dmeventd  where priority
stays raised all the time.

6 years agotests: skip test when not enough space
Zdenek Kabelac [Wed, 14 Mar 2018 10:21:56 +0000 (11:21 +0100)]
tests: skip test when not enough space

Make the test skipped instead of failing when there was not
enough space.

6 years agotests: use DM_DEBUG_WITH_LINE_NUMBERS
Zdenek Kabelac [Thu, 15 Mar 2018 09:41:08 +0000 (10:41 +0100)]
tests: use DM_DEBUG_WITH_LINE_NUMBERS

Use src:line also for debugging of tools like dmsetup.

6 years agotests: fix running tests on systems without udevd
Zdenek Kabelac [Wed, 14 Mar 2018 10:23:14 +0000 (11:23 +0100)]
tests: fix running tests on systems without udevd

Variable was unbound on systems without running udevd.

6 years agocleanup: missing dots and indent
Zdenek Kabelac [Wed, 14 Mar 2018 20:00:20 +0000 (21:00 +0100)]
cleanup: missing dots and indent

6 years agoactivation: check for prioritized_section
Zdenek Kabelac [Thu, 15 Mar 2018 09:28:43 +0000 (10:28 +0100)]
activation: check for prioritized_section

Detect we are in prioritezed section instead of critical one,
since these operation were supposed to NOT be happining during
whole set of operation.

This patch fixes verification of udev operations.

6 years agolocking: introduce prioritized_section
Zdenek Kabelac [Thu, 15 Mar 2018 08:07:24 +0000 (09:07 +0100)]
locking: introduce prioritized_section

Introduce prioritized_section() as a closer match to previous logic
of critical_section() that has been held over longer sequence of
ioctl commands - essentially it's matching operation on a single
cookie.

While 'critical_section()' now corresponds to locked memory - we hold
this memory only between suspend/resume thus notion of 'cookie' was
lost.

This patch restores some logic unintentionaly lost with dropping
memory locking for just activation/deactivation calls.

6 years agolibdm-stats: fix error messages
Zdenek Kabelac [Wed, 14 Mar 2018 20:00:46 +0000 (21:00 +0100)]
libdm-stats: fix error messages

When function dm_stats_populate() returns 0 it's an error and needs
log_error() message -  function can't have 'success' returning 0 or
error without reasons.

6 years agodmstatus: check nr_regions ahead of find call
Zdenek Kabelac [Wed, 14 Mar 2018 20:01:22 +0000 (21:01 +0100)]
dmstatus: check nr_regions ahead of find call

Prevent call of dm_stats_populate(), when there has been no
stats region detected for a DM device.
Such skip is evaluated as 'correct' visit of stats call and
not causing 'dmstats' command failure.

6 years agodmsetup: loop output table as verbose
Zdenek Kabelac [Wed, 14 Mar 2018 20:02:32 +0000 (21:02 +0100)]
dmsetup: loop output table as verbose

Resulting loop table line was streamed to 'stderr' stream - assuming this
was not a feature when user used '-v' for more verbose output
and properly show it via  'log_verbose()' on 'stdout'.

6 years agodevcache: add reason and always log_error
Zdenek Kabelac [Wed, 14 Mar 2018 18:33:20 +0000 (19:33 +0100)]
devcache: add reason and always log_error

With these read errors it's useful to know the reason.
Also avoid to log error just once so we know exactly
how many times we did failing read.

On the other hand reduce repeated log_error() on code 'backtrace'
path and change severity of message to just log_debug() so the
actual read error is printed once for one read.

6 years agolibdm: support for DM_DEBUG_WITH_LINE_NUMBERS
Zdenek Kabelac [Wed, 14 Mar 2018 17:08:16 +0000 (18:08 +0100)]
libdm: support for DM_DEBUG_WITH_LINE_NUMBERS

For any libdm tool using default debugging function allow
to show source filename and code line number when this
functionality is available.

6 years agotest: Skip tests which require too much RAM
Marian Csontos [Tue, 13 Mar 2018 12:41:33 +0000 (13:41 +0100)]
test: Skip tests which require too much RAM

- Tests for RAID reshape under load require too much RAM

6 years agotests: try unfreezeing raids
Zdenek Kabelac [Thu, 8 Mar 2018 16:32:47 +0000 (17:32 +0100)]
tests: try unfreezeing raids

With problematic kernels raid devices can be occasionaly left with
'frozen' status - try to 'unfreeze' them with idle message on teardown.

Also replace couple greps with 'built-in' dmsetup --select feature.

Note: dmsetup --select  currently reports 'No devices found' on stdout
and return success - looks like a bug to fix.

6 years agodmsetup: indent
Zdenek Kabelac [Mon, 12 Mar 2018 10:58:04 +0000 (11:58 +0100)]
dmsetup: indent

6 years agocleanup: matching signess
Zdenek Kabelac [Sun, 11 Mar 2018 20:08:07 +0000 (21:08 +0100)]
cleanup: matching signess

6 years agodmsetup: report close as debug
Zdenek Kabelac [Mon, 12 Mar 2018 22:01:52 +0000 (23:01 +0100)]
dmsetup: report close as debug

Since close() failures are not causing command errors,
issue error via debug log stream only.

6 years agodmsetup: use dm_snprintf
Zdenek Kabelac [Mon, 12 Mar 2018 10:57:31 +0000 (11:57 +0100)]
dmsetup: use dm_snprintf

6 years agodmsetup: update _display_info
Zdenek Kabelac [Mon, 12 Mar 2018 10:56:54 +0000 (11:56 +0100)]
dmsetup: update _display_info

Handle error code.

6 years agodmsetup: update messages
Zdenek Kabelac [Mon, 12 Mar 2018 10:56:25 +0000 (11:56 +0100)]
dmsetup: update messages

6 years agodmsetup: join large fprintf
Zdenek Kabelac [Mon, 12 Mar 2018 10:41:12 +0000 (11:41 +0100)]
dmsetup: join large fprintf

Concatenate strings and make binary slightly smaller.

6 years agodmsetup: stderr to log_error
Zdenek Kabelac [Mon, 12 Mar 2018 10:40:30 +0000 (11:40 +0100)]
dmsetup: stderr to log_error

6 years agodmsetup: cleanup err usage
Zdenek Kabelac [Fri, 9 Mar 2018 19:50:43 +0000 (20:50 +0100)]
dmsetup: cleanup err usage

Macro err() add '\n'.

6 years agodmsetup: use stderr for error output
Zdenek Kabelac [Fri, 9 Mar 2018 22:29:09 +0000 (23:29 +0100)]
dmsetup: use stderr for error output

When dmsetup command returns error, the message goes to stderr.

6 years agomirror: correct locking for mirror log initialization
Zdenek Kabelac [Tue, 13 Mar 2018 11:48:36 +0000 (12:48 +0100)]
mirror: correct locking for mirror log initialization

The code was not acking proper lock holding LVs when trying to
initialize mirror log to predefined values.

6 years agoscanning: skip more private devices
Zdenek Kabelac [Fri, 9 Mar 2018 13:49:38 +0000 (14:49 +0100)]
scanning: skip more private devices

Just like lvm2 has internal devices like _tdata which is using UUID with
suffix, there is similar private type of device for crypto device where
they are using CRYPT-TEMP uuid prefix.

Also ignore stratis.

6 years agocleanup: use path on stack
Zdenek Kabelac [Fri, 9 Mar 2018 11:59:13 +0000 (12:59 +0100)]
cleanup: use path on stack

6 years agoraid: skip frozen raid devices
Zdenek Kabelac [Thu, 8 Mar 2018 12:18:39 +0000 (13:18 +0100)]
raid: skip frozen raid devices

Some kernel version suffer from bad state transition where a device
steps into 'frozen' mode. Any application that tries to read such
raid gets unfortunatelly bloked.

As some sort of protection try to skip such raid device from being
scanned to minimize chances to block lvm2 command on such scan.

When such device is found, warning gets printed.

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