]> sourceware.org Git - lvm2.git/log
lvm2.git
5 years agoUse "cachevol" to refer to cache on a single LV
David Teigland [Wed, 30 Jan 2019 15:55:34 +0000 (09:55 -0600)]
Use "cachevol" to refer to cache on a single LV

and "cachepool" to refer to a cache on a cache pool object.

The problem was that the --cachepool option was being used
to refer to both a cache pool object, and to a standard LV
used for caching.  This could be somewhat confusing, and it
made it less clear when each kind would be used.  By
separating them, it's clear when a cachepool or a cachevol
should be used.

Previously:

- lvm would use the cache pool approach when the user passed
  a cache-pool LV to the --cachepool option.

- lvm would use the cache vol approach when the user passed
  a standard LV in the --cachepool option.

Now:

- lvm will always use the cache pool approach when the user
  uses the --cachepool option.

- lvm will always use the cache vol approach when the user
  uses the --cachevol option.

5 years agoconfig: make hints setting commented
David Teigland [Tue, 26 Feb 2019 21:54:30 +0000 (15:54 -0600)]
config: make hints setting commented

5 years agologging: new config settings to specify debug fields
David Teigland [Tue, 26 Feb 2019 20:31:44 +0000 (14:31 -0600)]
logging: new config settings to specify debug fields

For users who do not want all of the fields included
in debug lines, let them specify in lvm.conf which
fields to include.  timestamp, command[pid], and
file:line fields can all be disabled.

5 years agopvscan: fix hint recreation
David Teigland [Tue, 26 Feb 2019 16:30:11 +0000 (10:30 -0600)]
pvscan: fix hint recreation

Restore part of the fix from f0089472e7 that was lost
in the process of backporting 74a388cca1.

5 years agologging: add command[pid] and timestamp to file and verbose output
David Teigland [Fri, 22 Feb 2019 18:01:20 +0000 (12:01 -0600)]
logging: add command[pid] and timestamp to file and verbose output

Without this, the output from different commands in a single
log file could not be separated.

Change the default "indent" setting to 0 so that the default
debug output does not include variable spaces in the middle
of debug lines.

5 years agodmsetup: Fix multi-line concise table parsing
Alasdair G Kergon [Mon, 25 Feb 2019 13:41:51 +0000 (13:41 +0000)]
dmsetup: Fix multi-line concise table parsing

Use the correct loop variable within the loop, instead of reusing the
initial value.  Table lines after the first don't get terminated in
the right place.

Signed-off-by: Kurt Garloff <kurt@garloff.de>
5 years agoWHATS_NEW: concurrent pvscan autoactivation
David Teigland [Thu, 21 Feb 2019 21:31:23 +0000 (15:31 -0600)]
WHATS_NEW: concurrent pvscan autoactivation

5 years agopvscan: autoactivate a VG once
David Teigland [Wed, 13 Feb 2019 20:21:56 +0000 (14:21 -0600)]
pvscan: autoactivate a VG once

When a VG has multiple PVs, and all those PVs come online
at the same time, concurrent pvscans for each PV will all
create the individual pvid files, and all will often see
the VG is now complete.  This causes each of the pvscan
commands to think it should activate the VG, so there
are multiple activations of the same VG.  The vg lock
serializes them, and only the first pvscan actually does
the activation, but there is still a lot of extra overhead
and time used by the other pvscans that attempt to
activate the already active VG.  This can lead to a backlog
of pvscans and timeouts.

To fix this, this adds a new /run/lvm/vgs_online/ dir that
works like the existing /run/lvm/pvs_online/ dir.  Each pvscan
that wants to activate a VG will first try to exlusively create
the file vgs_online/<vgname>.  Only the first pvscan will
succeed, and that one will do the VG activation. The other
pvscans will find the vgname file exists and will not do the
activation step.

When a PV goes offline, the vgs_online file for the corresponding
VG is removed.  This allows the VG to be autoactivated again
when the PV comes online again.  This requires that the vgname be
stored in the pvid files.

5 years agopvscan: fix autoactivation from concurrent pvscans
David Teigland [Wed, 13 Feb 2019 19:35:24 +0000 (13:35 -0600)]
pvscan: fix autoactivation from concurrent pvscans

Use a file lock to ensure that only one pvscan will do
initialization of pvs_online, otherwise multiple concurrent
pvscans may all see an empty pvs_online directory and
do initialization.

The pvscan that is doing initialization should also only
attempt to activate complete VGs.

5 years agoWHATS_NEW: scan_lvs default change
David Teigland [Wed, 20 Feb 2019 20:04:49 +0000 (14:04 -0600)]
WHATS_NEW: scan_lvs default change

5 years agotests: set scan_lvs=1 in tests that stack PVs on LVs
David Teigland [Wed, 20 Feb 2019 19:31:30 +0000 (13:31 -0600)]
tests: set scan_lvs=1 in tests that stack PVs on LVs

5 years agoconfig: change scan_lvs default to 0
David Teigland [Wed, 20 Feb 2019 19:30:46 +0000 (13:30 -0600)]
config: change scan_lvs default to 0

so that lvm does not scan LVs for PVs by default.

5 years agohints: fix recreating hints from pvscan
David Teigland [Wed, 13 Feb 2019 21:23:43 +0000 (15:23 -0600)]
hints: fix recreating hints from pvscan

When aay was included in the pvscan --cache command,
the activation part was complaining about the unusual
state of the hint file since it had been recreated
just prior.

5 years agoapply obtain_device_list_from_udev to all libudev usage
David Teigland [Tue, 5 Feb 2019 16:15:40 +0000 (10:15 -0600)]
apply obtain_device_list_from_udev to all libudev usage

udev_dev_is_md_component and udev_dev_is_mpath_component
are not used for obtaining the device list, but they still
use libudev for device info.  When there are problems with
udev, these functions can get stuck. So, use the existing
obtain_device_list_from_udev config setting to also control
whether these "is component" functions are used, which gives
us a way to avoid using libudev entirely when it's causing
problems.

5 years agocleanup: indent
Zdenek Kabelac [Thu, 24 Jan 2019 13:12:42 +0000 (14:12 +0100)]
cleanup: indent

5 years agoman: lvmvdo component activation description
Zdenek Kabelac [Thu, 24 Jan 2019 15:12:04 +0000 (16:12 +0100)]
man: lvmvdo component activation description

Describe component activation for VDO Data LV.

5 years agoman: vdo regenerated
Zdenek Kabelac [Mon, 28 Jan 2019 20:37:23 +0000 (21:37 +0100)]
man: vdo regenerated

Correcting order of appearance of VDO description in lvcreate.

5 years agovdo: add some basic example
Zdenek Kabelac [Mon, 28 Jan 2019 20:39:40 +0000 (21:39 +0100)]
vdo: add some basic example

5 years agovdo: document types vdo and vdo-pool
Zdenek Kabelac [Mon, 28 Jan 2019 20:42:30 +0000 (21:42 +0100)]
vdo: document types vdo and vdo-pool

5 years agovdo: complete matching with thin syntax
Zdenek Kabelac [Mon, 28 Jan 2019 19:32:42 +0000 (20:32 +0100)]
vdo: complete matching with thin syntax

Just like we support for thin-pool syntax:

lvcreate --thinpool new_tpoolname -L Size vg

add same support logic with for vdo-poo:

lvcreate --vdopool new_vpoolname -L Size vg

Also move description of syntax bellow thin-pool, so it's
correctly ordered in generated man page.

5 years agolvconvert: pass force and yes options for vdo conversion
Zdenek Kabelac [Wed, 23 Jan 2019 21:51:24 +0000 (22:51 +0100)]
lvconvert: pass force and yes options for vdo conversion

5 years agotests: rounding for pools changed to power of 2
Zdenek Kabelac [Mon, 28 Jan 2019 21:05:17 +0000 (22:05 +0100)]
tests: rounding for pools changed to power of 2

Even with 64K chunk support, lvm2 will target power-of-2 chunks.

5 years agothin: select chunk size as power of 2
Zdenek Kabelac [Mon, 28 Jan 2019 18:50:41 +0000 (19:50 +0100)]
thin: select chunk size as power of 2

Whenever thin-pool chunk size is unspecified and left for lvm calculation
try to select the size as nearest highest power-of-2 instead of
just being a multiple of 64KiB.

5 years agocache: select chunk size as power of 2
Zdenek Kabelac [Mon, 28 Jan 2019 19:08:49 +0000 (20:08 +0100)]
cache: select chunk size as power of 2

When cache chunk size is not configured, and left for lvm deduction,
select the value which is power-of-2.

5 years agotests: use pvscan after enable_dev in process-each-duplicate-vgnames
David Teigland [Mon, 28 Jan 2019 17:38:05 +0000 (11:38 -0600)]
tests: use pvscan after enable_dev in process-each-duplicate-vgnames

instead of vgscan, so that new dev is recognized with hints

5 years agovgscan: drop 'take a while' message
David Teigland [Mon, 28 Jan 2019 17:22:42 +0000 (11:22 -0600)]
vgscan: drop 'take a while' message

every command does this

5 years agorpm: package lvmvdo man page
Zdenek Kabelac [Tue, 22 Jan 2019 13:33:03 +0000 (14:33 +0100)]
rpm: package lvmvdo man page

5 years agovdo: some formating updates
Zdenek Kabelac [Tue, 22 Jan 2019 13:27:55 +0000 (14:27 +0100)]
vdo: some formating updates

5 years agolv_manip: better work with PERCENT_VG modifier with lvresize
Zdenek Kabelac [Mon, 21 Jan 2019 14:37:51 +0000 (15:37 +0100)]
lv_manip: better work with PERCENT_VG modifier with lvresize

Fixing recent commit 022ebb0cfebee4ac8fdbe4e0c61e85db1038a115
Resize already has size that needs to be counted with,
otherwise upsizing operation could turn into size reduction one.

5 years agovdo: minor API cleanup
Zdenek Kabelac [Sun, 20 Jan 2019 23:48:05 +0000 (00:48 +0100)]
vdo: minor API cleanup

Since the parse_vdo_pool_status() become vdo_manip API part,
and there will be no 'dm' matching status parser,
the API can be simplified and closely match thin API here.

5 years agotests: vdo dmeventd resize
Zdenek Kabelac [Sun, 20 Jan 2019 15:08:53 +0000 (16:08 +0100)]
tests: vdo dmeventd resize

5 years agovdo: enable dmeventd resize
Zdenek Kabelac [Sun, 20 Jan 2019 15:08:11 +0000 (16:08 +0100)]
vdo: enable dmeventd resize

5 years agovdo: add simple wrapper for getting pool percentage
Zdenek Kabelac [Sun, 20 Jan 2019 23:24:30 +0000 (00:24 +0100)]
vdo: add simple wrapper for getting pool percentage

Just like with i.e. thins provide simple function for
getting percentage of VDO Pool usage (uses existing
status function).

5 years agotests: initial test for vdo resize
Zdenek Kabelac [Sun, 20 Jan 2019 11:38:59 +0000 (12:38 +0100)]
tests: initial test for vdo resize

5 years agotests: aux fix testing for kvdo
Zdenek Kabelac [Sun, 20 Jan 2019 11:15:20 +0000 (12:15 +0100)]
tests: aux fix testing for kvdo

5 years agotests: update cache test
Zdenek Kabelac [Sun, 20 Jan 2019 11:11:04 +0000 (12:11 +0100)]
tests: update cache test

Since migration_threshold is now protected to not be smaller
then 8*chunk_size - update tests to count with this modification.

5 years agovdo: man documenting resize
Zdenek Kabelac [Fri, 18 Jan 2019 19:28:35 +0000 (20:28 +0100)]
vdo: man documenting resize

5 years agocleanup: better naming
Zdenek Kabelac [Thu, 10 Jan 2019 17:01:06 +0000 (18:01 +0100)]
cleanup: better naming

5 years agovdo: allow resize of VDO and VDO pool volumes
Zdenek Kabelac [Thu, 10 Jan 2019 17:00:06 +0000 (18:00 +0100)]
vdo: allow resize of VDO and VDO pool volumes

Now with newer VDO kvdo target we can start to use standard mechanism
to enable resize of VDO volumes.

VDO pool can be grown.

Virtual volume grows on top of VDO pool when is not big enough.
Reduced VDOLV is calling discard for reduced areas - this can
take long time!

TODO: implement some pollable mechanism for out-of-lock TRIM.

5 years agovdo: size reduction requires VDO to be active
Zdenek Kabelac [Sat, 19 Jan 2019 18:32:02 +0000 (19:32 +0100)]
vdo: size reduction requires VDO to be active

To be able to send discard to reduced areas - the VDO LV needs to
be active.

5 years agovdo: discard reduced area
Zdenek Kabelac [Mon, 21 Jan 2019 11:20:07 +0000 (12:20 +0100)]
vdo: discard reduced area

Implement sending discard to reduced LV area.

5 years agovdo: estimate virtual size after resize
Zdenek Kabelac [Wed, 16 Jan 2019 14:35:07 +0000 (15:35 +0100)]
vdo: estimate virtual size after resize

5 years agovdo: introduce function for estimation of virtual size
Zdenek Kabelac [Wed, 16 Jan 2019 14:34:28 +0000 (15:34 +0100)]
vdo: introduce function for estimation of virtual size

5 years agolv_manip: better work with PERCENT_VG modifier
Zdenek Kabelac [Fri, 18 Jan 2019 21:27:02 +0000 (22:27 +0100)]
lv_manip: better work with PERCENT_VG modifier

When using 'lvcreate -l100%VG' and there is big disproportion between
real available space and requested setting - automatically fallback
to 100%FREE.

Difference can be seen when VG is big and already most space was
allocated, so the requestion 100%VG can end (and by spec for % modifier
it's correct) as LV with size of 1%VG.  Usually this is not a big
problem - buit in some cases - like cache-pool allocation, this
can result a big difference for chunksize selection.

With this patch it's more closely match common-sense logic without
the need of reitteration of too big changes in lvm2 core ATM.

TODO: in the future there should be allocator solving all allocations
in a single call.

5 years agodm: migration_threshold for old linked tools
Zdenek Kabelac [Sun, 20 Jan 2019 10:45:27 +0000 (11:45 +0100)]
dm: migration_threshold for old linked tools

Just like with precending  lvm2 device_mapper patch, ensure
that old users of libdm will also get fixed migration threshold
for caches.

5 years agodm: ensure migration_threshold is big enough
Zdenek Kabelac [Sun, 20 Jan 2019 10:45:10 +0000 (11:45 +0100)]
dm: ensure migration_threshold is big enough

When using caches with BIG pool size (>TB) there is required
to use relatively huge chunk size.  Once the chunksize has
got over 1MiB - kernel cache target stopped writing such chunks
back on this if the migration_threshold remained on default 1MiB
(2048 sectors) size.

This patch ensure, DM layer will not let pass table line which
has not big enough migration threshold that can let pass
at least 8 chunks (independently of lvm2 metadata).

5 years agoman: document dD attrs for VDO lvs
Zdenek Kabelac [Fri, 18 Jan 2019 16:33:41 +0000 (17:33 +0100)]
man: document dD attrs for VDO lvs

New attrs v(d)o pool and v(D) pool data.

5 years agoman: initial man page for VDO support
Zdenek Kabelac [Fri, 18 Jan 2019 15:59:13 +0000 (16:59 +0100)]
man: initial man page for VDO support

Basic lvm2 command support for VDO.

5 years agoman: missed --zero option for thin-pool creation
Zdenek Kabelac [Fri, 18 Jan 2019 21:38:34 +0000 (22:38 +0100)]
man: missed --zero option for thin-pool creation

During man page rewrite this info got lost and remained
only for lvconvert. So restore it back for lvcreate.

5 years agovdo: update vdo profile
Zdenek Kabelac [Fri, 18 Jan 2019 15:59:43 +0000 (16:59 +0100)]
vdo: update vdo profile

5 years agovdo: fix archived metadata comment
Zdenek Kabelac [Mon, 14 Jan 2019 15:21:02 +0000 (16:21 +0100)]
vdo: fix archived metadata comment

lvm uses 'minimum_io_size' name to exactly match  VDO naming here,
however in all common cases  _size  is using 'sector/512b' unit.
But in this case the value is in bytes and can have only 2 values:
either 512 or 4096.

It's probably not worth to rename it internaly, so we can just
drop comment - instead of using 1 or 8.

Thought let's think about it....

5 years agolvmdbusd: Use UUID instead of name for VG rename
Tony Asleson [Wed, 16 Jan 2019 21:43:39 +0000 (15:43 -0600)]
lvmdbusd:  Use UUID instead of name for VG rename

Use the UUID to specify the VG to rename instead of the name as this
approach works when we have duplicate VG names.

5 years agolvmdbusd: Handle duplicate VG names
Tony Asleson [Wed, 16 Jan 2019 21:41:27 +0000 (15:41 -0600)]
lvmdbusd: Handle duplicate VG names

Lvm can at times have duplicate names.  When this happens the daemon will
internally use vg_name:vg_uuid as the name for lookups, but display just
the vg_name externally.  If an API user uses the Manager.LookUpByLvmId and
queries the vg name they will only get returned one result as the API
can only accommodate returning 1.  The one returned is the first instance
found when sorting the volume groups by UUID.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1583510

5 years agolvmdbusd: Correct object manager lookups
Tony Asleson [Wed, 16 Jan 2019 21:27:55 +0000 (15:27 -0600)]
lvmdbusd: Correct object manager lookups

When we have two logical volumes which switch their names at the
same time we are left with incorrect lookups.  Anytime we find
an entry by doing a lookup by UUID or by name we will ensure
that the lookups are indeed correct.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1642176

5 years agolvmdbusd: Spelling correction
Tony Asleson [Mon, 14 Jan 2019 15:11:06 +0000 (09:11 -0600)]
lvmdbusd: Spelling correction

5 years agolvmdbusd: LookUpByLvmId: Add doc for cb, cbe
Tony Asleson [Mon, 14 Jan 2019 15:10:24 +0000 (09:10 -0600)]
lvmdbusd: LookUpByLvmId: Add doc for cb, cbe

5 years agolvmdbusd: Ensure all paths return value
Tony Asleson [Mon, 14 Jan 2019 15:08:55 +0000 (09:08 -0600)]
lvmdbusd: Ensure all paths return value

5 years agohints: invalidate when pvscan --cache sees a new PV
David Teigland [Wed, 16 Jan 2019 20:19:09 +0000 (14:19 -0600)]
hints: invalidate when pvscan --cache sees a new PV

An idea from Zdenek for better ensuring valid hints by invalidating
them when pvscan --cache <device> sees a new PV, which is a case
where we know that hints should be invalidated.  This is triggered
from systemd/udev logic, and there may be some cases where it would
invalidate hints that the existing methods wouldn't detect.

5 years agolvmlockd: fix make lockstart wait
David Teigland [Wed, 16 Jan 2019 19:24:29 +0000 (13:24 -0600)]
lvmlockd: fix make lockstart wait

when building without lvmlockd

5 years agomove init_use_aio
David Teigland [Tue, 15 Jan 2019 21:19:04 +0000 (15:19 -0600)]
move init_use_aio

it doesn't make sense to call from init_logging

5 years agolvmlockd: make lockstart wait for existing start
David Teigland [Wed, 16 Jan 2019 16:41:43 +0000 (10:41 -0600)]
lvmlockd: make lockstart wait for existing start

If there are two independent scripts doing:
  vgchange --lockstart vg
  lvchange -ay vg/lv

The first vgchange to do the lockstart will wait for
the lockstart to complete before returning.
The second vgchange to do the lockstart will see that
the start is already in progress (from the first) and
will do nothing.  This means the second does not wait
for any lockstart to complete, and moves on to the
lvchange which may find the lockspace still starting
and fail.

To fix this, make the vgchange lockstart command
wait for any lockstart's in progress to complete.

5 years agohints: fix hint flock when using lvm shell
David Teigland [Tue, 15 Jan 2019 18:23:16 +0000 (12:23 -0600)]
hints: fix hint flock when using lvm shell

also cmd->use_hints needs to be set for each shell command

5 years agoWHATS_NEW: device hints
David Teigland [Tue, 15 Jan 2019 16:33:25 +0000 (10:33 -0600)]
WHATS_NEW: device hints

5 years agoadd device hints to reduce scanning
David Teigland [Fri, 7 Dec 2018 20:35:22 +0000 (14:35 -0600)]
add device hints to reduce scanning

Save the list of PVs in /run/lvm/hints.  These hints
are used to reduce scanning in a number of commands
to only the PVs on the system, or only the PVs in a
requested VG (rather than all devices on the system.)

5 years agoraid: man regenerated
Zdenek Kabelac [Tue, 8 Jan 2019 12:06:03 +0000 (13:06 +0100)]
raid: man regenerated

5 years agomirror: regenerate config
Zdenek Kabelac [Tue, 8 Jan 2019 12:05:06 +0000 (13:05 +0100)]
mirror: regenerate config

Drop extra line in source file - since this line is auto-generated
and would appear twice in resuling .in file with 'make generate'.

5 years agovdo: regenerate config
Zdenek Kabelac [Tue, 8 Jan 2019 12:04:42 +0000 (13:04 +0100)]
vdo: regenerate config

5 years agoconfig: drop extra spaces
Zdenek Kabelac [Mon, 7 Jan 2019 16:39:55 +0000 (17:39 +0100)]
config: drop extra spaces

5 years agogenerators: avoid contacting syslog with generators
Zdenek Kabelac [Mon, 7 Jan 2019 14:48:39 +0000 (15:48 +0100)]
generators: avoid contacting syslog with generators

The systemd generators are executed very early during the switch
from initramfs to system partition and the syslog is not yet fully
operational - it may cause blocking, if some debug logging is enabled
at the same time in /etc/lvm/lvm.conf log{} section.

To avoid timeouting and killing this generator - rather enhance lvm
code to suppress any syslog communication when LVM_SUPPRESS_SYSLOG
envvar is set.

Use of this envvar is needed since the parsing of i.e. cmdline options
that could eventually override lvm.conf setting happens in this case
way too late and number of lines could have been already streamed to
syslog.

5 years agoscripts: lvm2-activation-generator fix lvmconfig call
Peter Rajnoha [Fri, 4 Jan 2019 10:11:13 +0000 (11:11 +0100)]
scripts: lvm2-activation-generator fix lvmconfig call

Fix a scenario where global/event_activation setting is not found. In
this case we need to take default value just like lvm tools do when
executed. So use "lvmconfig --type full".

Also, if we fail to execute lvmconfig for whatever reason, fallback to
generating the activation units as failsafe action.

Reported by: Bastian Blank <waldi debian org>

5 years agowritecache: use wipe_lv to warn about specific signatures
David Teigland [Thu, 3 Jan 2019 16:37:26 +0000 (10:37 -0600)]
writecache: use wipe_lv to warn about specific signatures

When initializing an LV to hold the writecache, use wipe_lv()
which looks for specific signatures on the LV.

Wiping signatures is not necessary, but printing a warning
that names a specific signature (in addition to the existing
generic warning/confirmation) may help if a user accidentally
specifies the wrong LV which contains something important.

5 years agowritecache: prompt before using an LV to hold cache
David Teigland [Wed, 2 Jan 2019 17:44:03 +0000 (11:44 -0600)]
writecache: prompt before using an LV to hold cache

5 years agoRevert "lvconvert: use standard wiping code"
David Teigland [Wed, 2 Jan 2019 17:21:45 +0000 (11:21 -0600)]
Revert "lvconvert: use standard wiping code"

This reverts commit fb85d5d02478a34ab6648bdbdf09a931176dee71.

Adding a confirmation prompt in the following commit so the
wiping confirmation won't be needed.

5 years agotests: indent
Zdenek Kabelac [Sat, 22 Dec 2018 23:55:00 +0000 (00:55 +0100)]
tests: indent

5 years agotests: fix unit test
Zdenek Kabelac [Sat, 22 Dec 2018 23:54:39 +0000 (00:54 +0100)]
tests: fix unit test

Use more universal  /usr/bin/env bash
(as older systems do only have /bin/sh)
Uncommment disabled event_activation testing.

5 years agotests: testing mirrorred mirror log
Zdenek Kabelac [Sun, 23 Dec 2018 00:06:16 +0000 (01:06 +0100)]
tests: testing mirrorred mirror log

Enable mirrorlog creation for test.

5 years agodebug: drop some unneeded backtraces
Zdenek Kabelac [Sat, 22 Dec 2018 22:44:42 +0000 (23:44 +0100)]
debug: drop some unneeded backtraces

5 years agocleanup: use zalloc
Zdenek Kabelac [Sat, 22 Dec 2018 22:33:23 +0000 (23:33 +0100)]
cleanup: use zalloc

Some places forget to use zalloc().

5 years agocov: fix memleak on error path
Zdenek Kabelac [Sat, 22 Dec 2018 22:37:04 +0000 (23:37 +0100)]
cov: fix memleak on error path

Do not leak lvs pointer on error path.

5 years agostats: initilize regions to NULL
Zdenek Kabelac [Fri, 21 Dec 2018 21:42:36 +0000 (22:42 +0100)]
stats: initilize regions to NULL

Commit 3750b0cff5ab1c41076afdf8275e3fa20aa756d0 used bad: error
path in more occasions thus it now needs regions defined as NULL.

5 years agoRevert "lvmlockd: Fix arguments when built without sanlock"
Zdenek Kabelac [Fri, 21 Dec 2018 21:41:00 +0000 (22:41 +0100)]
Revert "lvmlockd: Fix arguments when built without sanlock"

This reverts commit b068f21f6a24094936a33269067c18373b48f2cd.

This revert was incorrect.

5 years agocov: extent_size cannot be 0
Zdenek Kabelac [Fri, 21 Dec 2018 19:55:50 +0000 (20:55 +0100)]
cov: extent_size cannot be 0

Make this obvious to coverity.

5 years agocov: drop unneeded header file
Zdenek Kabelac [Fri, 21 Dec 2018 19:52:49 +0000 (20:52 +0100)]
cov: drop unneeded header file

MAX macro no longer needed in pe_align.

5 years agocov: looks like cut&paste error
Zdenek Kabelac [Fri, 21 Dec 2018 19:22:55 +0000 (20:22 +0100)]
cov: looks like cut&paste error

Fua and nofua code path should have different compares.

5 years agocov: ensure lock_type is not NULL
Zdenek Kabelac [Fri, 21 Dec 2018 19:04:35 +0000 (20:04 +0100)]
cov: ensure lock_type is not NULL

5 years agomangenerator: check strdup was successfull
Zdenek Kabelac [Fri, 21 Dec 2018 20:08:31 +0000 (21:08 +0100)]
mangenerator: check strdup was successfull

Check for strdup != NULL
and drop unneeded zeroing when buffer is overwritten.

5 years agodebug: tracing close errors
Zdenek Kabelac [Fri, 21 Dec 2018 19:26:15 +0000 (20:26 +0100)]
debug: tracing close errors

5 years agodebug: drop some extra backtraces
Zdenek Kabelac [Fri, 21 Dec 2018 19:24:56 +0000 (20:24 +0100)]
debug: drop some extra backtraces

Unneeded tracking after log_*.

5 years agobcache: fix memory leak on error path
Zdenek Kabelac [Fri, 21 Dec 2018 20:01:18 +0000 (21:01 +0100)]
bcache: fix memory leak on error path

Coverity noticed missing free of io struct on error path.

5 years agodmeventd: unlock lvm2 lock on error path
Zdenek Kabelac [Fri, 21 Dec 2018 20:29:05 +0000 (21:29 +0100)]
dmeventd: unlock lvm2 lock on error path

New code missed to unlock locked lvm2 on error path when
command is not configured.

5 years agolvconvert: writecache fix return code
Zdenek Kabelac [Fri, 21 Dec 2018 19:49:36 +0000 (20:49 +0100)]
lvconvert: writecache fix return code

Detach function return 0 for error and 1 for success.
Add missing log errors from failing deactivation.
Add missing log error from failing synchronization.

5 years agolvconvert: use standard wiping code
Zdenek Kabelac [Fri, 21 Dec 2018 19:39:39 +0000 (20:39 +0100)]
lvconvert: use standard wiping code

5 years agocleanup: missing copyright header
Zdenek Kabelac [Fri, 21 Dec 2018 11:58:03 +0000 (12:58 +0100)]
cleanup: missing copyright header

5 years agostats: fix error path when region is NULL
Zdenek Kabelac [Fri, 21 Dec 2018 19:12:40 +0000 (20:12 +0100)]
stats: fix error path when region is NULL

We should not call _stats_cleanup_region_ids() when regions
are NULL.
Also add backtracing for  goto.

5 years agoscripts: simplify including for generator
Zdenek Kabelac [Fri, 21 Dec 2018 18:14:32 +0000 (19:14 +0100)]
scripts: simplify including for generator

Uses included .c file as primary header includer.

5 years agoscripts: avoid voiding write result
Zdenek Kabelac [Fri, 21 Dec 2018 10:19:25 +0000 (11:19 +0100)]
scripts: avoid voiding write result

Gcc doesn't want to ignore write() return code.

5 years agolvmlockd: drop superfluous defines
Zdenek Kabelac [Fri, 21 Dec 2018 10:16:05 +0000 (11:16 +0100)]
lvmlockd: drop superfluous defines

These defines are automatically granted with _GNU_SOURCE
which is use for whole compilation via configure.h.

5 years agolvmlockd: use commonly used define NOTIFYDBUS_SUPPORT
Zdenek Kabelac [Fri, 21 Dec 2018 10:17:43 +0000 (11:17 +0100)]
lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT

Build with configured NOTIFYDBUS_SUPPORT, SYSTEMD_LIBS, SYSTEMD_CFLAGS.
Also add proper build dependencies on internal libraries.

5 years agolvmlockd: fix error return code for _init_vg_sanlock
Zdenek Kabelac [Fri, 21 Dec 2018 11:08:10 +0000 (12:08 +0100)]
lvmlockd: fix error return code for _init_vg_sanlock

In few cases error paths from initialization were returned as
'success == 1'.

Also assing num_mb with single compare checking valid sector_size.

For dumb compiler make num_mb always defined.

5 years agolvmpolld: improve makefile deps
Zdenek Kabelac [Fri, 21 Dec 2018 10:24:00 +0000 (11:24 +0100)]
lvmpolld: improve makefile deps

Add correct build dependencies on internal libraries.

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