]> sourceware.org Git - lvm2.git/log
lvm2.git
3 years agotests: ignore incosistent raid status
Zdenek Kabelac [Wed, 24 Mar 2021 11:08:40 +0000 (12:08 +0100)]
tests: ignore incosistent raid status

Just like lvm command ignores  0/xxxx report from judging the status.
Avoid using infinite loop and limit report checking to 100 checks.
If it would need more - something is not right.

3 years agotests: skip stray testing on real dev dir
Zdenek Kabelac [Wed, 24 Mar 2021 10:57:46 +0000 (11:57 +0100)]
tests: skip stray testing on real dev dir

Do not modify /dev dir maintained by udev.

3 years agotests: remove more file in teardonw
Zdenek Kabelac [Tue, 23 Mar 2021 23:39:01 +0000 (00:39 +0100)]
tests: remove more file in teardonw

Our tests may result in producation of huge set of
invalid links in /dev/disk directory depeding on version
of udev and various kinds of failures.

Also we happen to invoke some on-system pvscans generating
local /etc/lvm/archive & backups - remove them when
test is finished.

3 years agotests: query info instead of table
Zdenek Kabelac [Tue, 23 Mar 2021 23:37:24 +0000 (00:37 +0100)]
tests: query info instead of table

No need to access table when we just check presence,
so generate smaller error message about missing device.

3 years agotests: this test has race in it depending on kernel
Zdenek Kabelac [Tue, 23 Mar 2021 20:32:51 +0000 (21:32 +0100)]
tests: this test has race in it depending on kernel

Some kernel seems to keep 'lvextend' busy so long,
that actual resize already happens.

So ATM use 'should'  until something better is invented.

3 years agotests: aux clean DM on top of MD
Zdenek Kabelac [Tue, 23 Mar 2021 20:28:28 +0000 (21:28 +0100)]
tests: aux clean DM on top of MD

Before cleaning MD, try to remove any DM on top such MD.
Check is made through DM table check.
Maybe parse /proc/mdstat for this???

3 years agotests: wipefs with udev_wait
Zdenek Kabelac [Tue, 23 Mar 2021 13:57:10 +0000 (14:57 +0100)]
tests: wipefs with udev_wait

Try to synchronize with colliding udev.
Also retry once if there is some failure with some
sleep between next retry.

Use oflag=direct for wipping without wipefs.

3 years agotests: increase required version
Zdenek Kabelac [Tue, 23 Mar 2021 13:39:13 +0000 (14:39 +0100)]
tests: increase required version

Seems like version 1.13.2 remains crashing kernel - so increase
the required version for this reshaping test.

3 years agotests: use prefix for VG name
Zdenek Kabelac [Tue, 23 Mar 2021 13:38:54 +0000 (14:38 +0100)]
tests: use prefix for VG name

3 years agotests: ignore failure of zeroing
Zdenek Kabelac [Tue, 23 Mar 2021 11:05:55 +0000 (12:05 +0100)]
tests: ignore failure of zeroing

Older mdadm fails the command, when the signature is already gone.

3 years agotests: use mirror throttling
Zdenek Kabelac [Tue, 23 Mar 2021 10:34:34 +0000 (11:34 +0100)]
tests: use mirror throttling

Combination of throttling and slowed device is a bit faster.

Also add FIXME about the mutliple spawn polling processing
when activating invidual LV for a pvmove.

3 years agotests: set default basic flavour
Zdenek Kabelac [Tue, 23 Mar 2021 10:33:30 +0000 (11:33 +0100)]
tests: set default basic flavour

3 years agotests: try to move more date
Zdenek Kabelac [Tue, 23 Mar 2021 09:53:02 +0000 (10:53 +0100)]
tests: try to move more date

Throttling was not helping with race - try to use more data.

3 years agoWHATS_NEW: update
Zdenek Kabelac [Tue, 23 Mar 2021 08:59:26 +0000 (09:59 +0100)]
WHATS_NEW: update

3 years agotests: test needs to have playable locking dir
Zdenek Kabelac [Tue, 23 Mar 2021 08:48:47 +0000 (09:48 +0100)]
tests: test needs to have playable locking dir

3 years agotests: aux updates
Zdenek Kabelac [Tue, 23 Mar 2021 08:48:03 +0000 (09:48 +0100)]
tests: aux updates

Select unused md from /proc/mdstat
Check for wipefs once.

3 years agotests: enhance mdadm_create
Zdenek Kabelac [Tue, 23 Mar 2021 00:16:21 +0000 (01:16 +0100)]
tests: enhance mdadm_create

For older mdadm its hard to support new names - to simplify things
keep using  /dev/mdXXX name which is automatically selected.

3 years agotests: set known locking dir
Zdenek Kabelac [Tue, 23 Mar 2021 00:15:29 +0000 (01:15 +0100)]
tests: set known locking dir

Tests running in the system may use locking dir of the system.

3 years agomake: add few more predef symbols for cflow
Zdenek Kabelac [Sat, 20 Mar 2021 18:02:41 +0000 (19:02 +0100)]
make: add few more predef symbols for cflow

3 years agoconfigure: use rawhide version
Zdenek Kabelac [Mon, 22 Mar 2021 17:51:21 +0000 (18:51 +0100)]
configure: use rawhide version

3 years agotests: remove unused wait_md_create
Zdenek Kabelac [Mon, 22 Mar 2021 21:07:23 +0000 (22:07 +0100)]
tests: remove unused wait_md_create

3 years agotests: avoid sleep on kill path
Zdenek Kabelac [Mon, 22 Mar 2021 21:05:22 +0000 (22:05 +0100)]
tests: avoid sleep on kill path

Before sleeping, check if pid is still there.

3 years agotests: convert to use mdadm_create
Zdenek Kabelac [Mon, 22 Mar 2021 21:23:53 +0000 (22:23 +0100)]
tests: convert to use mdadm_create

Flip usage from prepare_md_dev to mdadm_create.

3 years agotests: more usage of new aux mdadm_create
Zdenek Kabelac [Mon, 22 Mar 2021 20:45:39 +0000 (21:45 +0100)]
tests: more usage of new aux mdadm_create

Condense tests and use the new mdadm_create.

3 years agotests: use mdadm support
Zdenek Kabelac [Mon, 22 Mar 2021 17:55:07 +0000 (18:55 +0100)]
tests: use mdadm support

Use for testing new mdadm_create  aux wrapper.
Place functionality into a 2 pass loop - one for 'auto' other for 'start'.
Share same tests between raid level 0 and level 1 version of raid.

3 years agotests: new aux mdadm_create
Zdenek Kabelac [Mon, 22 Mar 2021 17:54:54 +0000 (18:54 +0100)]
tests: new aux mdadm_create

Add generic wrapper for mdadm --create which takes
normal 'mdadm' args - but allows us to handle differences of
mdadm usage across various version of mdadm tool.

Resulting MD device is availalble in  $(< MD_DEV).

Automatic cleaning is made through   cleanup_md_dev

Calling of mdadm_create cleans previous MD dev if it exists.

3 years agotests: remove local changes
Zdenek Kabelac [Mon, 22 Mar 2021 09:15:08 +0000 (10:15 +0100)]
tests: remove local changes

Use aux for preparing profile.
Avoid playing with LVM_BINARY localy - we already
preset this variable in lib/utils.

3 years agotests: even more aggressive throttling
Zdenek Kabelac [Mon, 22 Mar 2021 08:49:42 +0000 (09:49 +0100)]
tests: even more aggressive throttling

Try if the test gets slowed down with slower mirroring (1)
or we would need something better to beat the race.

3 years agotests: skip only portion of test
Zdenek Kabelac [Sun, 21 Mar 2021 22:25:16 +0000 (23:25 +0100)]
tests: skip only portion of test

Seems this kernel bug is taking more time to get it fixed,
so skipping only failing portion of test and ending with WARNING.

3 years agotests: more system defaults for installed tests
Zdenek Kabelac [Sat, 20 Mar 2021 22:50:16 +0000 (23:50 +0100)]
tests: more system defaults for installed tests

When testing installed binaries on system, use more 'built-in'
predefined settings to usethem with their  compiled-in values.

Also it's better to use same locking dir so the system's pvscan
is not unexpectedly interferring with test commands.

3 years agotests: remove incorrect check
Zdenek Kabelac [Sat, 20 Mar 2021 17:17:09 +0000 (18:17 +0100)]
tests: remove incorrect check

We would need to be check same status value - otherwise
we can hit race in validating 2 different states.

3 years agogcc: declaration of tmpfile shadows a global
Zdenek Kabelac [Sun, 21 Mar 2021 22:32:12 +0000 (23:32 +0100)]
gcc: declaration of tmpfile shadows a global

Rename tmpfile to tmppath to avoid declaration shadowing of:

/usr/include/stdio.h:174: warning: shadowed declaration is here

3 years agolvm: Fix editline compilation
Marian Csontos [Mon, 22 Mar 2021 09:50:42 +0000 (10:50 +0100)]
lvm: Fix editline compilation

3 years agotests: use mirror throttling
Zdenek Kabelac [Sat, 20 Mar 2021 09:14:09 +0000 (10:14 +0100)]
tests: use mirror throttling

With small mirrors its better to throttle speed of mirror in dm-mirror.

3 years agotests: slow down device more
Zdenek Kabelac [Sat, 20 Mar 2021 08:58:50 +0000 (09:58 +0100)]
tests: slow down device more

Make the race with too fast merging less likely to occure.

3 years agotests: prohibit 4K brd device with integrity
Zdenek Kabelac [Sat, 20 Mar 2021 08:54:30 +0000 (09:54 +0100)]
tests: prohibit 4K brd device with integrity

Older kernels hit these errors:

device-mapper: integrity: Bio not aligned on 8 sectors: 0x8ffc, 0x4

3 years agotests: add FIXME to raid test
Zdenek Kabelac [Sat, 20 Mar 2021 09:39:02 +0000 (10:39 +0100)]
tests: add FIXME to raid test

We have here some kind of catch-22 - since older kernels do
use 'resync' while new 'recover' for initial raid synchronization.

So now - how do we recognize in which state of raid we are.
ATM seems to be simplest to simply keep disabled droping of primary raid
leg unless we are in sync.

FIXME: we should add a target version check and enable removal

3 years agoraid: restore mirror handling in _raid_in_sync
Zdenek Kabelac [Sat, 20 Mar 2021 09:35:53 +0000 (10:35 +0100)]
raid: restore mirror handling in _raid_in_sync

Function is not having the best name since it does check
no just raid LVs to be in sync.

Restore the mirror percentage checking - although without retries,
since only raid target is currently known to need it - for other
types it would be ATM a bug to get inconsistent result.

3 years agotests: fix condition for exclusion of /dev
Zdenek Kabelac [Fri, 19 Mar 2021 23:28:13 +0000 (00:28 +0100)]
tests: fix condition for exclusion of /dev

3 years agotests: aux reject /dev as testing dir
Zdenek Kabelac [Fri, 19 Mar 2021 09:39:00 +0000 (10:39 +0100)]
tests: aux reject /dev as testing dir

If LVM_TEST_DIR would be set to /dev, reject such selection.

3 years agotests: drop status workaround
Zdenek Kabelac [Fri, 19 Mar 2021 01:06:46 +0000 (02:06 +0100)]
tests: drop status workaround

lvconvert should now recognize resync from older kernels.

3 years agotests: copy more data
Zdenek Kabelac [Thu, 18 Mar 2021 23:52:06 +0000 (00:52 +0100)]
tests: copy more data

Give pvmove --abort bigger aborting window.

3 years agotests: require newer raid version
Zdenek Kabelac [Thu, 18 Mar 2021 23:09:19 +0000 (00:09 +0100)]
tests: require newer raid version

Tests needs reshape support - so require newer target version
as quick fix.

TODO: inspect indiviual supportable conversion with older versions.

3 years agomake: cflow target works again
Zdenek Kabelac [Fri, 19 Mar 2021 22:10:55 +0000 (23:10 +0100)]
make: cflow target works again

Restored 'make cflow' functinality.
Produces some quick referece of function chaining and usage.

3 years agomake: simplify dependency loading
Zdenek Kabelac [Fri, 19 Mar 2021 15:12:10 +0000 (16:12 +0100)]
make: simplify dependency loading

No need for extra ifdefs around.

3 years agomake: restore buildir != srcdir support
Zdenek Kabelac [Fri, 19 Mar 2021 13:47:21 +0000 (14:47 +0100)]
make: restore buildir != srcdir support

Our new faster deps generation missed support for
buildirs != srcdir - as it can be usable to have
several builds from unchanged directory with sources.

3 years agomake: generate
Zdenek Kabelac [Thu, 18 Mar 2021 22:01:26 +0000 (23:01 +0100)]
make: generate

Add new lvmdevices.8_pregen and vgimportdevices.8_pregen.

3 years agogit: update .gitignore
Zdenek Kabelac [Thu, 18 Mar 2021 22:14:24 +0000 (23:14 +0100)]
git: update .gitignore

Hide some files from older builds.

3 years agocleanup: reduce code dupliction
Zdenek Kabelac [Fri, 19 Mar 2021 09:45:26 +0000 (10:45 +0100)]
cleanup: reduce code dupliction

3 years agogcc: ensure buffer ends with 0
Zdenek Kabelac [Thu, 18 Mar 2021 22:08:08 +0000 (23:08 +0100)]
gcc: ensure buffer ends with 0

3 years agoraid: move non dm functions from DEVMAPPER ifdef
Zdenek Kabelac [Fri, 19 Mar 2021 10:02:21 +0000 (11:02 +0100)]
raid: move non dm functions from DEVMAPPER ifdef

When lvm is compiled without device-mapper - this functions
do not need this kernel support so move them from ifdef DEVMAPPER
sections.

3 years agoraid: resync cannot lose primary leg
Zdenek Kabelac [Fri, 19 Mar 2021 00:54:06 +0000 (01:54 +0100)]
raid: resync cannot lose primary leg

Prohibity droping primary leg while resyncing.

3 years agoraid: interruptible usleep when waiting for sync
Zdenek Kabelac [Thu, 18 Mar 2021 22:00:23 +0000 (23:00 +0100)]
raid: interruptible usleep when waiting for sync

Whiel waiting for raid to return consistent status,
use interruptible sleep - so command can break quickly.

Use lv_raid_status() to get percentage easily from status.

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Thu, 18 Mar 2021 15:55:20 +0000 (16:55 +0100)]
WHATS_NEW: updates

3 years agotests: check for raid sync in progress
Zdenek Kabelac [Wed, 17 Mar 2021 10:22:16 +0000 (11:22 +0100)]
tests: check for raid sync in progress

TODO: this needs to be built-in in lvm command itself.

3 years agotests: add check for lvconvert without zeroing
Zdenek Kabelac [Thu, 18 Mar 2021 17:19:16 +0000 (18:19 +0100)]
tests: add check for lvconvert without zeroing

Check lvconvert -Zn does not zero thin-pool metadata.
Also check --type zero is usable for thin-pool data.

3 years agotests: check mixing striped with error and zero
Zdenek Kabelac [Thu, 18 Mar 2021 15:00:01 +0000 (16:00 +0100)]
tests: check mixing striped with error and zero

3 years agotests: aux always shift emulated devices by 1MiB
Zdenek Kabelac [Thu, 18 Mar 2021 12:32:48 +0000 (13:32 +0100)]
tests: aux always shift emulated devices by 1MiB

Always shift created virtual PVs on backing device by 1MiB
and leave 1MiB free space at the end of device.

This way the system doesn't see same PV headers at multiple devices.

3 years agothinpool: support lvconvert without zeroing
Zdenek Kabelac [Wed, 17 Mar 2021 18:09:58 +0000 (19:09 +0100)]
thinpool: support lvconvert without zeroing

Since lvm does support external users of thin-pool when thin devices
are managed outside it can be useful to support conversion to
thin pool from data and metadata LV without zeroing.
TransactionID will be 0 in lvm2 metadata.

  lvconvert -Zn --thinpool vg/data --poolmetadata vg/meta

3 years agopool: allow data on zero and error segtypes
Zdenek Kabelac [Wed, 17 Mar 2021 17:26:08 +0000 (18:26 +0100)]
pool: allow data on zero and error segtypes

Renables usage of --type zero and --type error LVs to serve as
backend for _tdata device. Clearly not very useful in practice,
as it can't store any real data, but usable for some testing
and some sort of perfomance checking.

  lvcreate --type zero -L1T -n pool vg
  lvconvert --thinpool vg/pool

Will create a thin-pool with zero device backend.

3 years agolvresize: allow mixing striped with errors or zero
Zdenek Kabelac [Thu, 18 Mar 2021 12:19:45 +0000 (13:19 +0100)]
lvresize: allow mixing striped with errors or zero

Enabled extension/mixing of stripes/linears, error and zero
segtype LVs with stripes/linear, error and zero segtypes.

It is not very useful in practice, as the user cannot store any real
data on error or zero segtypes, but it may get some uses in
some scenarios where i.e. some portion of the device should not be
readable. Mixing of types happens on 'extent_size' level:

  lvcreate -L1 -n lv vg
  lvextend --type error  -L+1 vg/lv
  lvextend --type zero   -L+1 vg/lv
  lvextend --type linear -L+1 vg/lv
  lvextend --type striped -L+1 vg/lv

  lvs -o+segtype,seg_size vg

Note: when the type is not specified, the last segment type is
automatically selected.

It's also a small 'can of worms' since we can't tell LVs if
the LV is linear/error/zero or their mixtures. So the meaning behind
them may need some updates.

We already have this types of LV created i.e by:

  vgreduce --removemissing --force

where missing LV segments have been replaced by either
error or zero segtype (lvm.conf).

TODO: it might be worth adding a message while such device is activated.

3 years agosegtypes: macros for error and zero segtypes
Zdenek Kabelac [Thu, 18 Mar 2021 12:13:38 +0000 (13:13 +0100)]
segtypes: macros for error and zero segtypes

3 years agolvremove: extra code for handling thinpool data
Zdenek Kabelac [Thu, 18 Mar 2021 12:15:44 +0000 (13:15 +0100)]
lvremove: extra code for handling thinpool data

Add some extra code to handle differently sized thin-pool
from thin-pool data volume.

ATM this can't really happen, but once we start to use multiple
commits while resizing stacked LV, we may actually get into
the position, where data LV has been already resized,
but thin-pool stayed with old size.

But for now - report difference as internal error.

3 years agolvresize: support resize of stacked virtual LV
Zdenek Kabelac [Thu, 18 Mar 2021 12:14:13 +0000 (13:14 +0100)]
lvresize: support resize of stacked virtual LV

Update the LV stack with the size also for virtual LVs.

3 years agodev_manager: skip also zero targets
Zdenek Kabelac [Thu, 18 Mar 2021 16:17:21 +0000 (17:17 +0100)]
dev_manager: skip also zero targets

Devices made only from 'error' target cannot be used,
but if the device is also combined from 'zero' target
the same rule can be applied as such device cannot be used.

3 years agodev_manager: add lv_raid_status
Zdenek Kabelac [Wed, 17 Mar 2021 08:50:09 +0000 (09:50 +0100)]
dev_manager: add lv_raid_status

Just like with other segtype use this function to get whole
raid status info available per a single ioctl call.

Also it nicely simplifies read of percentage info about
in_sync portion of raid volume.

TODO: drop use of other calls then lv_raid_status call,
since all such calls could already use status - so it just
adds unnecessary duplication.

3 years agodev_manager: status check with info check included
Zdenek Kabelac [Wed, 17 Mar 2021 10:20:23 +0000 (11:20 +0100)]
dev_manager: status check with info check included

Reduce ioctl count and avoid separate info check,
when we can get the same info from status ioctl.

When devmanager calls return 0, then the exists value 0
means the reason of failure is missing device in table.
In such case we avoid stack trace.

Swap the flush parameter for the vdo status function
to match thin pool status.

3 years agothin: ignore parallel merge while polling
Zdenek Kabelac [Wed, 17 Mar 2021 10:17:32 +0000 (11:17 +0100)]
thin: ignore parallel merge while polling

If the thin volume has no merging snapshot,
(being already merged) there is nothing to check.

3 years agothin: add extra protection
Zdenek Kabelac [Wed, 17 Mar 2021 08:13:20 +0000 (09:13 +0100)]
thin: add extra protection

Check explicitely created LV already has thin segment.
As currenlty it's the only user - this patch should have no impact.

3 years agocleanup: simplier check first
Zdenek Kabelac [Wed, 17 Mar 2021 07:56:23 +0000 (08:56 +0100)]
cleanup: simplier check first

3 years agoman: lvmlockd use of lvmlockctl_kill_command
David Teigland [Wed, 17 Mar 2021 18:00:47 +0000 (13:00 -0500)]
man: lvmlockd use of lvmlockctl_kill_command

3 years agotests: avoid leaking unkilled commands
Zdenek Kabelac [Tue, 16 Mar 2021 23:44:45 +0000 (00:44 +0100)]
tests: avoid leaking unkilled commands

Between each new test here we want to kill previous commands,
otherwise they will influence results of next test.

3 years agotests: wait for Aa status
Zdenek Kabelac [Tue, 16 Mar 2021 23:00:03 +0000 (00:00 +0100)]
tests: wait for Aa status

3 years agotests: increase version of targets for progress
Zdenek Kabelac [Tue, 16 Mar 2021 21:59:01 +0000 (22:59 +0100)]
tests: increase version of targets for progress

3 years agotests: workaround for some raid targets
Zdenek Kabelac [Tue, 16 Mar 2021 21:53:23 +0000 (22:53 +0100)]
tests: workaround for some raid targets

Problem with some target is that shortly after initialization it
returns incorrect status letters.

3 years agotests: no further fixes likely to be expected
Zdenek Kabelac [Tue, 16 Mar 2021 20:40:30 +0000 (21:40 +0100)]
tests: no further fixes likely to be expected

Skip tests for these kernels.

3 years agotests: require newer version of raid target
Zdenek Kabelac [Tue, 16 Mar 2021 20:37:19 +0000 (21:37 +0100)]
tests: require newer version of raid target

3 years agotests: update mirror test
Zdenek Kabelac [Tue, 16 Mar 2021 20:18:53 +0000 (21:18 +0100)]
tests: update mirror test

Log results of uniq.
Remove few unneeded lvs calls.

3 years agotests: added check for kernel version
Zdenek Kabelac [Tue, 16 Mar 2021 19:54:28 +0000 (20:54 +0100)]
tests: added check for kernel version

With older kernels this test can't work reliable,
since 'suspend' used to clean all dirty blocks
(taking even several seconds).

3 years agodebug: start with upper case
Zdenek Kabelac [Tue, 16 Mar 2021 13:16:36 +0000 (14:16 +0100)]
debug: start with upper case

Use upper case letter to start sentence.
Also drop unneded check for vg as it's already non-null.

3 years agocleanup: use dm_strncpy
Zdenek Kabelac [Tue, 16 Mar 2021 13:06:24 +0000 (14:06 +0100)]
cleanup: use dm_strncpy

Use own function.

3 years agodevice_is_usable: minor improve
Zdenek Kabelac [Tue, 16 Mar 2021 09:10:10 +0000 (10:10 +0100)]
device_is_usable: minor improve

Replace allocated buffer with local vg_name which doesn't
pass pointer to allocation.

Join some conditions together.

3 years agocleanup: typo
Zdenek Kabelac [Mon, 15 Mar 2021 17:59:15 +0000 (18:59 +0100)]
cleanup: typo

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Mon, 15 Mar 2021 09:58:00 +0000 (10:58 +0100)]
WHATS_NEW: updates

3 years agotests: add test for merging
Zdenek Kabelac [Sun, 14 Mar 2021 21:48:20 +0000 (22:48 +0100)]
tests: add test for merging

Check we handle mething of thin snapshot that is itself thick snapshot
origin.
Also use  lvpoll to better wait for finish of merging.

3 years agotests: wait till fs is synchronized
Zdenek Kabelac [Thu, 11 Mar 2021 09:46:31 +0000 (10:46 +0100)]
tests: wait till fs is synchronized

Adding full filesystem sync, trying to fight with strange error from losetup:

losetup: loopa: failed to set up loop device: Resource temporarily unavailable

loop0: detected capacity change from 0 to 4096
loop_set_block_size: loop0 () has still dirty pages (nrpages=13)

Also reuse internal aux wipefs_a

3 years agotests: update handling of thin-pool removal
Zdenek Kabelac [Thu, 11 Mar 2021 09:25:41 +0000 (10:25 +0100)]
tests: update handling of thin-pool removal

We shall no longer activate thin-pool, when
it's going away together with all thin volumes.

3 years agoshellcheck: avoid assign warnings
Zdenek Kabelac [Mon, 15 Mar 2021 09:49:47 +0000 (10:49 +0100)]
shellcheck: avoid assign warnings

Shellcheck seems to be happier when assigning variables with quotes.

3 years agocov: void unused result
Zdenek Kabelac [Mon, 15 Mar 2021 09:49:20 +0000 (10:49 +0100)]
cov: void unused result

3 years agodebug: update message
Zdenek Kabelac [Sun, 14 Mar 2021 12:15:50 +0000 (13:15 +0100)]
debug: update message

3 years agodebug: keep microseconds aligned
Zdenek Kabelac [Fri, 12 Mar 2021 21:39:42 +0000 (22:39 +0100)]
debug: keep microseconds aligned

3 years agodebug: drop stack from regular code flow
Zdenek Kabelac [Fri, 12 Mar 2021 21:30:29 +0000 (22:30 +0100)]
debug: drop stack from regular code flow

3 years agolvpoll: improve merge polling
Zdenek Kabelac [Sun, 14 Mar 2021 21:03:41 +0000 (22:03 +0100)]
lvpoll: improve merge polling

When multiple polling tasks are watching for same LV, clearly
when some of them wins the game - other polling tasks will fail.
Improve the logic and report success if the merged LV is
actually not a merging origin anymore (since likely someone
else has already finished merging).

3 years agopooldaemon: increase min polling interval
Zdenek Kabelac [Sun, 14 Mar 2021 21:00:42 +0000 (22:00 +0100)]
pooldaemon: increase min polling interval

Although we support '0' interval - it's highly inefficent to
do so many scans in busy-loop.

So ATM raise minimal rescan time to 100ms.

TODO: revisit whole timing logic here as it does have some sideeffect
hiddent impact and can considerably eat CPU in some cases.

3 years agolvremove: use to_remove for snapshot removal
Zdenek Kabelac [Sun, 14 Mar 2021 12:18:45 +0000 (13:18 +0100)]
lvremove: use to_remove for snapshot removal

Reuse similar 'acceleration' as used for dependent volumes also
for snapshot  - so when origin is being removed with all thick
snapshots, don't bother with individual 'COW' detachments
and write&commits, and when possible handle this all within
a single commit.

3 years agolvremove: use common routine for prompting
Zdenek Kabelac [Sun, 14 Mar 2021 12:17:03 +0000 (13:17 +0100)]
lvremove: use common routine for prompting

Move code for prompting about removed LV to a single function
and use it also to prompt for removal of origin and all its thick
snapshots and also when removing merging origin.

Function does handle postponed write_and_commit so there is
no 'in-flight' operation while waiting on [y|n] answer.

3 years agovg_validate: fix validation of merging thin origin
Zdenek Kabelac [Sun, 14 Mar 2021 10:44:54 +0000 (11:44 +0100)]
vg_validate: fix validation of merging thin origin

Compat code and handle unusual case, where
thin snapshot is also a 'thick snapshot origin' and such
snapshot gets merged into a thin origin.

However since now lv_is_visible() (which is complex function)
replaced &VISIBLE_LV check, the whole this check seems to be
no longer useful as sum of all 3 will always match??

3 years agoconfig: correct option name
Zdenek Kabelac [Sat, 13 Mar 2021 19:35:16 +0000 (20:35 +0100)]
config: correct option name

3 years agoconfig: keep issue_discards in config struct
Zdenek Kabelac [Sat, 13 Mar 2021 17:33:55 +0000 (18:33 +0100)]
config: keep issue_discards in config struct

Avoid quering for this config option and keep it for removing in struct.
Also drop unused cache_vgmetadata variable.

3 years agocleanup: move common condition
Zdenek Kabelac [Sun, 14 Mar 2021 12:15:24 +0000 (13:15 +0100)]
cleanup: move common condition

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