]> sourceware.org Git - lvm2.git/log
lvm2.git
4 years agothin: enhance lvcreate error paths
Zdenek Kabelac [Fri, 25 Sep 2020 20:43:57 +0000 (22:43 +0200)]
thin: enhance lvcreate error paths

Improve error response and reporting, when creating thin snapshots.
If the thin pool kernel metadata already have device with ID lvm2
tries to create, give more meanigful error message and also properly
restore transaction id to the value known to thin-pool in this case.

Before it's been possible to divert by one from kernel TID value,
and lvm2 stacked delete message for such thin device.

4 years agothin: no delete message for device_id 0
Zdenek Kabelac [Fri, 25 Sep 2020 20:42:53 +0000 (22:42 +0200)]
thin: no delete message for device_id 0

Since we always use device_id > 0, we could use
device_id == 0 to actually mark thinLV as an
LV we want to remove without delete message.

4 years agovgsplit: support for VDO volumes
Zdenek Kabelac [Thu, 24 Sep 2020 18:49:18 +0000 (20:49 +0200)]
vgsplit: support for VDO volumes

Enable support and ensure VDO always moves with VDOPOOL.

4 years agotests: basic test for vdo on raid LV
Zdenek Kabelac [Wed, 23 Sep 2020 12:48:17 +0000 (14:48 +0200)]
tests: basic test for vdo on raid LV

Check stacing of VDO on top of raid LV works.

4 years agotests: add check for rename of cached vdopool
Zdenek Kabelac [Wed, 23 Sep 2020 11:22:08 +0000 (13:22 +0200)]
tests: add check for rename of cached vdopool

4 years agotests: a bit bigger mirrors
Zdenek Kabelac [Wed, 23 Sep 2020 12:06:19 +0000 (14:06 +0200)]
tests: a bit bigger mirrors

Seems even with throttling we occasinally need slightly more.

4 years agolvconvert: suppport vdo raid conversion also through vpool
Zdenek Kabelac [Wed, 23 Sep 2020 12:44:44 +0000 (14:44 +0200)]
lvconvert: suppport vdo raid conversion also through vpool

User could directly use 'vdopool' LV name for conversion into raid.
(lvconvert --type raid1 vg/vdopool)

4 years agovdo: allow passing renamed vdopool name to kernel
Zdenek Kabelac [Wed, 23 Sep 2020 11:20:28 +0000 (13:20 +0200)]
vdo: allow passing renamed vdopool name to kernel

Although kernel does not allow to load a new dm table
with renamed vdopool, at least make lvm2 code ready
it it every will get supported.

4 years agovdo: disable support for online rename of vdopool LV
Zdenek Kabelac [Wed, 23 Sep 2020 11:18:23 +0000 (13:18 +0200)]
vdo: disable support for online rename of vdopool LV

Since ATM kernel does not support this operation,
disable 'lvrename' of an active vdopool.

As a workaround, user may simply deactivate, rename and activate.

4 years agotests: use aux wrapper and add more notes
Zdenek Kabelac [Tue, 22 Sep 2020 14:27:21 +0000 (16:27 +0200)]
tests: use aux wrapper and add more notes

This test seems to be hitting some corner case in handling
out-of-metadata space condintion in thin-pool.

Add few more aid notes and functionality.

Also add missing '|| true' with now direct-IO dd command.

4 years agotests: move function to aux for reuse
Zdenek Kabelac [Tue, 22 Sep 2020 21:37:50 +0000 (23:37 +0200)]
tests: move function to aux for reuse

4 years agotests: update test
Zdenek Kabelac [Tue, 22 Sep 2020 21:26:28 +0000 (23:26 +0200)]
tests: update test

Shorten running time of the test.
Fix some issues in invoked resizing script to it returns
correct return code and dmeventd can be a little bit quicker
in this test.

4 years agotests: check vdopool policy extension
Zdenek Kabelac [Tue, 22 Sep 2020 13:44:31 +0000 (15:44 +0200)]
tests: check vdopool policy extension

Check pool will grow even with small policy amount.

4 years agovdo: enhance vdo pool extension
Zdenek Kabelac [Tue, 22 Sep 2020 21:25:58 +0000 (23:25 +0200)]
vdo: enhance vdo pool extension

When user tries to extend vdo pool - he needs to go always
at least by 1 full VDO slab  (defined as  vdo_slab_size_mb).

To avoid all trouble around find 'workable' size - lvm2 automatically
increases the passed (or by --use-policies calculated) extension size
(and informs a user about sometimes possibly large increase as slab
size can go upto 32GiB)

With VDO users need to always 'think-big' anyway and expect such
operation to be in GiB domain range.

4 years agovdo: extend vdo segment validation
Zdenek Kabelac [Tue, 22 Sep 2020 21:17:54 +0000 (23:17 +0200)]
vdo: extend vdo segment validation

Try to catch all suspicious VDO segments in metadata early.

4 years agovdo: correct message about policy extend support
Zdenek Kabelac [Tue, 22 Sep 2020 21:16:11 +0000 (23:16 +0200)]
vdo: correct message about policy extend support

Policy extend is already supported for vdo pools as well,
so correct the error message.

4 years agovdo: drop unnecessary tabulator from metadata output
Zdenek Kabelac [Tue, 22 Sep 2020 18:38:07 +0000 (20:38 +0200)]
vdo: drop unnecessary tabulator from metadata output

4 years agoactivation: use revert_lv on tree suspend failure
Zdenek Kabelac [Tue, 22 Sep 2020 11:35:27 +0000 (13:35 +0200)]
activation: use revert_lv on tree suspend failure

When thetable reload fails during suspend() - we were only calling
plain resume() - and this will reload only those devices,
which were left suspend, but will not try to restore
metadata state according to lvm2 reverted metadata.
So if we were reloading device tree - we have restored
only top-level LV and rest of reverted device manipulation
were left alone and possibly mismatched what is in committed
metadata.

FIXME: There are several cases were such revert will likely not work
properly anyway as some operation are currenly handled in single commit,
while they need multiple commits, but it's step towards better correctness.
At least we catch there errors now earlier.

4 years agotests: fix cleanup for unbound variables
Zdenek Kabelac [Sat, 19 Sep 2020 22:32:26 +0000 (00:32 +0200)]
tests: fix cleanup for unbound variables

When loop can't handle sector-size option - failure caused double fail
for access of unbound variable
Also fix expression for 'rm' and remove loops after loop release.

4 years agotests: add FIXME case
Zdenek Kabelac [Sat, 19 Sep 2020 22:01:48 +0000 (00:01 +0200)]
tests: add FIXME case

4 years agotests: use DIRECT io for zeroing whenver we can
Zdenek Kabelac [Sat, 19 Sep 2020 21:25:11 +0000 (23:25 +0200)]
tests: use DIRECT io for zeroing whenver we can

Performance with direct I/O here is noticable better,
so use it instead of buffered write whenever we can.

4 years agotests: use 4K with mkfs.xfs
Zdenek Kabelac [Sat, 19 Sep 2020 21:58:30 +0000 (23:58 +0200)]
tests: use 4K with mkfs.xfs

If the test runs of loop device backend with 512 sectors,
xfs selects this smaller sector size and then data do not fit
(we would need -l9 with most of 'raids').
With 4K sectors data always fits.

4 years agotests: skip with fail of first prepare_scsi
Zdenek Kabelac [Sat, 19 Sep 2020 21:03:06 +0000 (23:03 +0200)]
tests: skip with fail of first prepare_scsi

4 years agotests: check for cvol
Zdenek Kabelac [Sat, 19 Sep 2020 21:02:17 +0000 (23:02 +0200)]
tests: check for cvol

Check for cvol.
Add check for cmeta.

4 years agobache: fix error return value
Zdenek Kabelac [Sat, 19 Sep 2020 21:00:50 +0000 (23:00 +0200)]
bache: fix error return value

Return 0 as failure (as checked for).
Also add INTERNAL_ERROR if  'DI' would be -1.

4 years agotests: use parametrized function
Zdenek Kabelac [Sat, 19 Sep 2020 14:51:01 +0000 (16:51 +0200)]
tests: use parametrized function

Shorten and make the test easily readable by moving same code into
function and removed one duplicated test for 512,4096 combination.

Always use scsi_debug - since default ramdisk or loop device backend
is unpredictible.

4 years agotests: use zero backend
Zdenek Kabelac [Sat, 19 Sep 2020 13:58:11 +0000 (15:58 +0200)]
tests: use zero backend

Since we are not reading read - just use zero device as backend for
test, so we do not eat real disk space.

4 years agotests: use faster awk generator
Zdenek Kabelac [Sat, 19 Sep 2020 13:57:29 +0000 (15:57 +0200)]
tests: use faster awk generator

Shortens log length.

4 years agotests: ensure mnt is defined before trap install
Zdenek Kabelac [Fri, 18 Sep 2020 19:59:24 +0000 (21:59 +0200)]
tests: ensure mnt is defined before trap install

4 years agotests: reduce disk usage
Zdenek Kabelac [Fri, 18 Sep 2020 19:59:02 +0000 (21:59 +0200)]
tests: reduce disk usage

4 years agometadata: open rw fd before closing ro fd
David Teigland [Fri, 18 Sep 2020 19:42:23 +0000 (14:42 -0500)]
metadata: open rw fd before closing ro fd

lvm opens devices readonly to scan them, but
needs to open then readwrite to update the metadata.
Previously, the ro fd was closed before the rw fd
was opened, leaving a small gap where the dev was
not held open, and during which the dev could
possibly change which storage it referred to.

With the bcache_change_fd() interface, lvm opens a
rw fd on a device to be written, tells bcache to
change to the new rw fd, and closes the ro fd.

. open dev ro
. read dev with the ro fd (label_scan)
. lock vg (ex for writing)
. open dev rw
. close ro fd
. rescan dev to check if the metadata changed
  between the scan and the lock
. if the metadata did change, reread in full
. write the metadata

4 years agobcache: use indirection table for fd
David Teigland [Thu, 17 Sep 2020 14:40:18 +0000 (09:40 -0500)]
bcache: use indirection table for fd

Add a "device index" (di) for each device, and use this
in the bcache api to the rest of lvm.  This replaces the
file descriptor (fd) in the api.  The rest of lvm uses
new functions bcache_set_fd(), bcache_clear_fd(), and
bcache_change_fd() to control which fd bcache uses for
io to a particular device.

. lvm opens a dev and gets and fd.
  fd = open(dev);

. lvm passes fd to the bcache layer and gets a di
  to use in the bcache api for the dev.
  di = bcache_set_fd(fd);

. lvm uses bcache functions, passing di for the dev.
  bcache_write_bytes(di, ...), etc.

. bcache translates di to fd to do io.

. lvm closes the device and clears the di/fd bcache state.
  close(fd);
  bcache_clear_fd(di);

In the bcache layer, a di-to-fd translation table
(int *_fd_table) is added.  When bcache needs to
perform io on a di, it uses _fd_table[di].

In the following commit, lvm will make use of the new
bcache_change_fd() function to change the fd that
bcache uses for the dev, without dropping cached blocks.

4 years agotests: printf to awk
Zdenek Kabelac [Fri, 18 Sep 2020 15:27:17 +0000 (17:27 +0200)]
tests:  printf to awk

Shorten trace logs.

4 years agotests: update integrity-dmeventd
Zdenek Kabelac [Fri, 18 Sep 2020 14:56:00 +0000 (16:56 +0200)]
tests: update integrity-dmeventd

Use tee.
Switch to more simple generator with awk
(which doesn't produce long debug trace)
Sync before sleep to provoke raid action.

4 years agotests: enhance low-disk-space behavior
Zdenek Kabelac [Fri, 18 Sep 2020 12:32:15 +0000 (14:32 +0200)]
tests: enhance low-disk-space behavior

Use new SKIP_WITH_LOW_SPACE and set higher requirement for free space.

But still this test can't run on system's tmpfs directories -
as they typically provide less then 2G of space and when the test
runs there it also provisioning for all READ pages!)
BRD (ramdisk) device should work.

Extend a _wait_recalc() loop for slower hw.
When creating large raid which do not need to be fully synchronized use
them on delay devices - so even less data needs read/write.
Remove unneeded lvchange as lvcreate is already leaving LV inactive.
Replace printf with awk as generator.

mm

4 years agotests: inittest supports SKIP_WITH_LOW_SPACE
Zdenek Kabelac [Fri, 18 Sep 2020 12:25:50 +0000 (14:25 +0200)]
tests: inittest supports SKIP_WITH_LOW_SPACE

Test can set individually a higher value for required free space on
storage.

Note: it is not fully reliable since when 'brd' (ramdisk) device is used
this free space value is rather meanigul, but it might help
in case where a real filesystem is doing back-end for test devices.

4 years agotests: utils better handle ouf of disk space
Zdenek Kabelac [Fri, 18 Sep 2020 12:29:15 +0000 (14:29 +0200)]
tests: utils better handle ouf of disk space

When the test exhausts all the available free space on storage device,
then during the fail we cannot write anything as well - yet
the teardown needs to finish it's work - otherwise we leave
basicaly overfilled filesystem for all remaining tests.

4 years agotests: aux better handle invalid table
Zdenek Kabelac [Fri, 18 Sep 2020 12:23:20 +0000 (14:23 +0200)]
tests: aux better handle invalid table

In cases where internal functions like zero_dev, delay_dev pass-in
invalid parameter so resulting table can't work, resume at least
previous table line before failing out - so the cleaning process
later on is not stuck waiting on a suspended device.

4 years agotests: also use sed to shorten log output
Zdenek Kabelac [Thu, 17 Sep 2020 22:31:59 +0000 (00:31 +0200)]
tests: also use sed to shorten log output

4 years agotests: resolve missing removal of loopdevice on error path
Zdenek Kabelac [Thu, 17 Sep 2020 22:31:11 +0000 (00:31 +0200)]
tests: resolve missing removal of loopdevice on error path

In case of test failure, loop device leaked and occupied space forever.

4 years agotests: bigger data still needed for 0.7.0
Zdenek Kabelac [Thu, 17 Sep 2020 21:26:03 +0000 (23:26 +0200)]
tests: bigger data still needed for 0.7.0

4 years agotests: lower memory usage
Zdenek Kabelac [Thu, 17 Sep 2020 21:25:23 +0000 (23:25 +0200)]
tests: lower memory usage

Reduce memory needed by test at one time.

4 years agoconfigure: enable integrity by default
David Teigland [Wed, 16 Sep 2020 20:14:51 +0000 (15:14 -0500)]
configure: enable integrity by default

4 years agohints: enhance debug messages
David Teigland [Wed, 16 Sep 2020 19:46:50 +0000 (14:46 -0500)]
hints: enhance debug messages

4 years agolabel: cleanup set_byte error exit
David Teigland [Wed, 16 Sep 2020 18:54:16 +0000 (13:54 -0500)]
label: cleanup set_byte error exit

4 years agoRevert "label: use formaters FMTu64 and FMTsize_t"
David Teigland [Wed, 16 Sep 2020 18:47:06 +0000 (13:47 -0500)]
Revert "label: use formaters FMTu64 and FMTsize_t"

This reverts commit d0ccb2521ba4f34455078f87f46cc41f5761ffc0.

4 years agotests: smaller delay and lowered version
Zdenek Kabelac [Wed, 16 Sep 2020 11:21:16 +0000 (13:21 +0200)]
tests: smaller delay and lowered version

See if this will still work. Some boxes are delayed too much.
Also try to check for raid extend progress from version 1.13.

4 years agotests: fix bash regex syntax
Zdenek Kabelac [Wed, 16 Sep 2020 11:12:17 +0000 (13:12 +0200)]
tests: fix bash regex syntax

Typo before last commit.

4 years agotests: switch for checking version of installed tools
Zdenek Kabelac [Mon, 14 Sep 2020 19:25:04 +0000 (21:25 +0200)]
tests: switch for checking version of installed tools

It looks like older tools were compacting metadata more.

4 years agotests: skip kernel for this test
Zdenek Kabelac [Mon, 14 Sep 2020 19:23:16 +0000 (21:23 +0200)]
tests: skip kernel for this test

Kills this kernel ATM

4 years agolabel: use formaters FMTu64 and FMTsize_t
Zdenek Kabelac [Tue, 15 Sep 2020 19:47:39 +0000 (21:47 +0200)]
label: use formaters FMTu64 and FMTsize_t

Produces code without casts to differntly signed types
and also shortens and enhances readbility.

4 years agowipe: dev_set_bytes resolves zeroing
Zdenek Kabelac [Tue, 15 Sep 2020 18:35:48 +0000 (20:35 +0200)]
wipe: dev_set_bytes resolves zeroing

Since dev_write_zeros() is just subset of dev_set_bytes()
use it directly and simplify code.

4 years agowipe: convert zero_value to uint8_t
Zdenek Kabelac [Tue, 15 Sep 2020 14:40:53 +0000 (16:40 +0200)]
wipe: convert zero_value to uint8_t

We always write this value as byte.

4 years agowipe: zeroing of 8 sectors is granted
Zdenek Kabelac [Tue, 15 Sep 2020 14:38:50 +0000 (16:38 +0200)]
wipe: zeroing of 8 sectors is granted

With do_zero min is always 8 sectors, so use 0 as default.

4 years agolabel: deduplicate dev_set_bytes
Zdenek Kabelac [Tue, 15 Sep 2020 14:29:12 +0000 (16:29 +0200)]
label: deduplicate dev_set_bytes

As dev_write_zeros() is same as dev_set_bytes() reused the code
directly.

4 years agolabel: code deduplication
Zdenek Kabelac [Tue, 15 Sep 2020 14:20:16 +0000 (16:20 +0200)]
label: code deduplication

4 years agohints: enhance debug with log_sys_debug
Zdenek Kabelac [Tue, 15 Sep 2020 19:33:30 +0000 (21:33 +0200)]
hints: enhance debug with log_sys_debug

4 years agolvcreate: change error message
Zdenek Kabelac [Tue, 15 Sep 2020 20:45:49 +0000 (22:45 +0200)]
lvcreate: change error message

Provide more useful error message.

4 years agolvcreate: add extra synchronization at error path
Zdenek Kabelac [Fri, 4 Sep 2020 16:08:59 +0000 (18:08 +0200)]
lvcreate: add extra synchronization at error path

Put explict udev synchronization before we try to deactive devices.

4 years agotests: protect this test for another kernel
Zdenek Kabelac [Sat, 12 Sep 2020 17:08:24 +0000 (19:08 +0200)]
tests: protect this test for another kernel

Thisi 3.10.0-862 kernel also dies with this test.

4 years agotests: tune usage of smaller metadata
Zdenek Kabelac [Sat, 12 Sep 2020 17:06:05 +0000 (19:06 +0200)]
tests: tune usage of smaller metadata

While the previous commit c9b40083fc34b5e2a1bfc7b251b38c0b8737483f
decresed version to 1.19 for using bigger datasets,  it's not
been quite right - so from our bb machine it looks like
bigger metadata consumption started with 1.19 and kernel 4.18
(fc27)

4 years agotests: raise needed target version
Zdenek Kabelac [Sat, 12 Sep 2020 17:09:41 +0000 (19:09 +0200)]
tests: raise needed target version

Require higher version to avoid early bugs.

4 years agotests: improve cache abort test
Zdenek Kabelac [Sun, 13 Sep 2020 09:33:13 +0000 (11:33 +0200)]
tests: improve cache abort test

Use bigger volume and slowdown writing to cache device.
This allows more simple to reach 'dirty' state.
Also document exactly 1 SIGINT has to fire aborting of flushing.

4 years agotests: check in_sync prints also dm status
Zdenek Kabelac [Sat, 12 Sep 2020 17:04:56 +0000 (19:04 +0200)]
tests: check in_sync prints also dm status

It's more useful to see how the progress of status checking is moving.

4 years agocache: simplier signal handling
Zdenek Kabelac [Sun, 13 Sep 2020 09:33:39 +0000 (11:33 +0200)]
cache: simplier signal handling

Use just single sigint_allow()/restore() within flushing loop
and void one extra signal manipulation.

4 years agoheaders: remove unused headers
Zdenek Kabelac [Sun, 13 Sep 2020 09:32:29 +0000 (11:32 +0200)]
headers: remove unused headers

4 years agoconfigure: just upper case start of sentence
Zdenek Kabelac [Sat, 12 Sep 2020 17:04:22 +0000 (19:04 +0200)]
configure: just upper case start of sentence

4 years agolocking: restore blocking signal for VG_GLOBAL lck
Zdenek Kabelac [Sun, 13 Sep 2020 19:10:17 +0000 (21:10 +0200)]
locking: restore blocking signal for VG_GLOBAL lck

During removal of a lot of locking code the signal blocking got lost
and signal processing got broken leading to unpredictable
behavior of i.e. activation code the can get interrupted in the
middle of DM table processing.

lvm2 code always expects signals are blocked while lock is held
unless it is explictelly placed into section of:
sigint_allow();....;sigint_restore();
For checking catched interrupt there is sigint_catched();

4 years agotests: avoid using string
Zdenek Kabelac [Sat, 12 Sep 2020 10:25:58 +0000 (12:25 +0200)]
tests: avoid using string

String 'TEST WARNING' may not be present in the test script itself.
Add '\ ' to avoid 'grep' matching test as the test with warning.

4 years agotests: support for 16T is needed
Zdenek Kabelac [Sat, 12 Sep 2020 07:47:38 +0000 (09:47 +0200)]
tests: support for 16T is needed

Likely 32bit machines can't pass here.

4 years agotests: change skip to die for upstream crash
Zdenek Kabelac [Sat, 12 Sep 2020 07:46:43 +0000 (09:46 +0200)]
tests: change skip to die for upstream crash

So the failing test is not lost from sight.

4 years agotests: skip test on failing kernel
Zdenek Kabelac [Sat, 12 Sep 2020 07:46:21 +0000 (09:46 +0200)]
tests: skip test on failing kernel

4 years agocov: drop checking for EWOULDBLOCK
Zdenek Kabelac [Sat, 12 Sep 2020 11:15:12 +0000 (13:15 +0200)]
cov: drop checking for EWOULDBLOCK

Reduce cov warning and remove this really ancient define
as lvm2 was never compilable on such platform.

4 years agocov: check sscanf result
Zdenek Kabelac [Sat, 12 Sep 2020 11:03:07 +0000 (13:03 +0200)]
cov: check sscanf result

4 years agocov: drop model for origin_from_cow
Zdenek Kabelac [Sat, 12 Sep 2020 07:45:52 +0000 (09:45 +0200)]
cov: drop model for origin_from_cow

4 years agolvconvert: check if LV has cow type
Zdenek Kabelac [Sat, 12 Sep 2020 10:08:15 +0000 (12:08 +0200)]
lvconvert: check if LV has cow type

Cow may not be a COW type, the return value of origin_from_cow(cow) may be NULL.

Reported-by: Wu Guanghao <wuguanghao3@huawei.com>
Reported-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
4 years agorevert "lvconvert: check if LV has snapshot type"
Zdenek Kabelac [Sat, 12 Sep 2020 10:07:12 +0000 (12:07 +0200)]
revert "lvconvert: check if LV has snapshot type"

This reverts commit 7db124774a2b79105e7c9c6b42df88219fc070ca.
Actually we need to check for lv_is_cow().

4 years agotests: check for boundary allocation sizes
Zdenek Kabelac [Fri, 11 Sep 2020 19:15:42 +0000 (21:15 +0200)]
tests: check for boundary allocation sizes

4 years agotests: reduce disk space usage by pvck-dump
Zdenek Kabelac [Fri, 11 Sep 2020 12:44:05 +0000 (14:44 +0200)]
tests: reduce disk space usage by pvck-dump

Lower disk usage for 'dd'.

4 years agotests: lower at_least to version 1.19
Zdenek Kabelac [Fri, 11 Sep 2020 11:35:30 +0000 (13:35 +0200)]
tests: lower at_least to version 1.19

With this version already can be seen different metadata usage on
kernel side, so lower the target version.

4 years agotests: have_cache function checks for cache-pool
Zdenek Kabelac [Fri, 11 Sep 2020 09:59:55 +0000 (11:59 +0200)]
tests: have_cache function checks for cache-pool

Check for cache-pool segment as plain cache can match writecache.

4 years agoalloc: improve estimation of sufficient_pes_free
Zdenek Kabelac [Fri, 11 Sep 2020 18:57:20 +0000 (20:57 +0200)]
alloc: improve estimation of sufficient_pes_free

Metadata size was calculated correctly only for raids.

Fixes problem for crash during lvcreate when thin-pool was created
on a VG where remaining free space had the size to only fit a single
metadata LV and not also its _pmspare.

Lvcreate crashed with this assert message:

lvcreate: metadata/pv_map.c:198: consume_pv_area: Assertion `to_go <= pva->count' failed.
Aborted (core dumped)

TODO: there is probably to large overload of several alloc_handle
variables.

Reported-by: Wu Guanghao<wuguanghao3@huawei.com>
Reported-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
4 years agolvconvert: check if LV has snapshot type
Wu Guanghao [Fri, 11 Sep 2020 09:42:16 +0000 (17:42 +0800)]
lvconvert: check if LV has snapshot type

Cow may not be a snapshot type, the return value of origin_from_cow(cow) may be NULL

Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
4 years agolvconvert_poll: ensure LV has snapshot type
Wu Guanghao [Fri, 11 Sep 2020 09:41:01 +0000 (17:41 +0800)]
lvconvert_poll: ensure LV has snapshot type

LV may not be a snapshot type, the return value of find_snapshot(lv) may be NULL.
Here, we will call stack if LV is not a snapshot type.

Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
4 years agopvmove: check return value of top_level_lv_name()
Wu Guanghao [Fri, 11 Sep 2020 09:40:09 +0000 (17:40 +0800)]
pvmove: check return value of top_level_lv_name()

The return value of top_level_lv_name() may be NULL, so we should
check return value of top_level_lv_name before calling
strcmp(lv->name, top_level_lv_name(vg, lv_name)).

Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
4 years agogitignore: ignore all cscope generated files
Zhao Heming [Thu, 10 Sep 2020 15:38:07 +0000 (23:38 +0800)]
gitignore: ignore all cscope generated files

When using cscope to read code, it will generate below 3 files for speedup
cross-refer: cscope.files, cscope.in.out, cscope.po.out

The .gitignore only contains "/cscope.out". It a little bit messy when
executing 'git status', and other git commands.
This patch add all cscope generated files in .gitignore.

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agothin: compensate metadata size by extra percent
Zdenek Kabelac [Fri, 11 Sep 2020 11:31:55 +0000 (13:31 +0200)]
thin: compensate metadata size by extra percent

When using --use-policy for automatic extension of thin-pool,
the extension of thin-pool's metadata itself can actually take
some extra space.
Since I'm not aware of exact compensation formula, add just
1% extra to calculated amount and hope it fits.

Wanted target is to always have usable thin-pool that fits
bellow pool_metadata_min_threshold().

4 years agolv_manip: even better rounding
Zdenek Kabelac [Fri, 11 Sep 2020 11:31:29 +0000 (13:31 +0200)]
lv_manip: even better rounding

4 years agotests: aux collects stack trace when stuck is assumed
Zdenek Kabelac [Thu, 10 Sep 2020 15:05:02 +0000 (17:05 +0200)]
tests: aux collects stack trace when stuck is assumed

Automatically collect traces in this case.

4 years agotests: adding "" around DM_DEV_DIR
Zdenek Kabelac [Thu, 10 Sep 2020 14:47:52 +0000 (16:47 +0200)]
tests: adding "" around DM_DEV_DIR

4 years agotests: disable dbustest with valgrind testing
Zdenek Kabelac [Thu, 10 Sep 2020 14:39:07 +0000 (16:39 +0200)]
tests: disable dbustest with valgrind testing

4 years agocleanup: comment typo
Zdenek Kabelac [Thu, 10 Sep 2020 20:38:13 +0000 (22:38 +0200)]
cleanup: comment typo

4 years agodebug: drop debug trace from regular path
Zdenek Kabelac [Thu, 10 Sep 2020 21:33:46 +0000 (23:33 +0200)]
debug: drop debug trace from regular path

Since we query on regular code these:
  lv_raid_has_integrity()
  lv_has_integrity_recalculate_metadata()
without prior checking for lv_is_raid() - these 'return 0' should
not use <stacktrace> as they are expected.

4 years agolv_manip: relocate check to proper function
Zdenek Kabelac [Thu, 10 Sep 2020 15:39:43 +0000 (17:39 +0200)]
lv_manip: relocate check to proper function

4 years agolvextend: improve percentage estimation
Zdenek Kabelac [Thu, 10 Sep 2020 20:38:34 +0000 (22:38 +0200)]
lvextend: improve percentage estimation

Correcting rounding rules for percentage evaluation.

Validate supported range of percentage.
(although ranges are already validated earlier on code path)

4 years agoconfigure: compile with vdo and writecache by default
Zdenek Kabelac [Wed, 9 Sep 2020 13:56:06 +0000 (15:56 +0200)]
configure: compile with vdo and writecache by default

Enable compilation of vdo and writecache support as internaly
supported segment types by default.

For disabling use:

--with-vdo=none
--with-writcache=none

4 years agointegrity: fix segfault reporting integrity for other lvs
David Teigland [Wed, 9 Sep 2020 15:22:07 +0000 (10:22 -0500)]
integrity: fix segfault reporting integrity for other lvs

4 years agoman: correcting vdo issues
Zdenek Kabelac [Wed, 9 Sep 2020 13:14:22 +0000 (15:14 +0200)]
man: correcting vdo issues

Fixing reported bugs within provided examples - so examples
can be used via cut&paste.

4 years agoman: correctly use configured directories
Zdenek Kabelac [Wed, 9 Sep 2020 11:22:37 +0000 (13:22 +0200)]
man: correctly use configured directories

4 years agoRevert "raid: add _rimage and _rmeta as origin_only"
Zdenek Kabelac [Tue, 8 Sep 2020 22:58:52 +0000 (00:58 +0200)]
Revert "raid: add _rimage and _rmeta as origin_only"

This reverts commit 3388e194892e9ab7a36b72e512796c2d218dae6e.
More thinking needed.

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