]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agopre-release v2_02_136
Alasdair G Kergon [Sat, 28 Nov 2015 01:25:53 +0000 (01:25 +0000)]
pre-release

8 years agotests: make unit testing usable again
Zdenek Kabelac [Fri, 27 Nov 2015 09:54:57 +0000 (10:54 +0100)]
tests: make unit testing usable again

Make unit tests usable/compilable with newer header files.
Add 'initial' dmlist_t  for list tests.
More will come...

8 years agocleanup: clean gcc shadow declaration of version warning
Zdenek Kabelac [Thu, 26 Nov 2015 20:52:22 +0000 (21:52 +0100)]
cleanup: clean gcc shadow declaration of version warning

8 years agodebug: show LV name where dlid creation failed
Zdenek Kabelac [Thu, 26 Nov 2015 20:52:05 +0000 (21:52 +0100)]
debug: show LV name where dlid creation failed

8 years agocleanup: using display_lvname
Zdenek Kabelac [Wed, 25 Nov 2015 15:06:31 +0000 (16:06 +0100)]
cleanup: using display_lvname

Use for showing vgname/lvname in messages.
No functional change.

8 years agocleanup: remove unused code
Zdenek Kabelac [Wed, 25 Nov 2015 14:45:19 +0000 (15:45 +0100)]
cleanup: remove unused code

Remove long outstand unused code lines, which were already
been obsoleted by other code.

Statuses and snapshot tree creation is already handled differently.

Also drop some 'extra' log_error() and use only stack;
since error has already been reported.

8 years agocleanup: avoid allocation for vg_name
Zdenek Kabelac [Wed, 25 Nov 2015 15:04:27 +0000 (16:04 +0100)]
cleanup: avoid allocation for vg_name

Since we do not use dev_manager in a way we would have destroyed VG
content while  in-use - we could safely keep just pointer.
So dropping strdup.

Also it seems we actually no longer use vg_name for anything
so it may possibly go away completely unless it would be useful
for debugging...

8 years agolibdm: const raid params and error for unsupported type
Zdenek Kabelac [Thu, 26 Nov 2015 08:18:46 +0000 (09:18 +0100)]
libdm: const raid params and error for unsupported type

Accept const struct with raid params (No API change).
Also add extra error message when raid type is unsupported.

8 years agolvmconfig: add --sinceversion for --type new
Peter Rajnoha [Wed, 25 Nov 2015 13:09:20 +0000 (14:09 +0100)]
lvmconfig: add --sinceversion for --type new

Just for convenience to display all new configuration settings
introduced since given version (before, there was only --atversion
to display settings introduced in concrete version).

For example:
$ lvmconfig --type new --sinceversion 2.2.120
allocation {
# cache_mode="writethrough"
# cache_settings {
# }
}
global {
use_lvmlockd=0
# lvmlockd_lock_retries=3
# sanlock_lv_extend=256
use_lvmpolld=1
}
activation {
}
# report {
# compact_output_cols=""
# time_format="%Y-%m-%d %T %z"
# }
local {
# host_id=0
}

8 years agocleanup: rename lv_ondisk to lv_committed
Zdenek Kabelac [Wed, 25 Nov 2015 10:10:32 +0000 (11:10 +0100)]
cleanup: rename lv_ondisk to lv_committed

Patch has no functional change.

8 years agocleanup: change ondisk committed
Zdenek Kabelac [Wed, 25 Nov 2015 09:52:22 +0000 (10:52 +0100)]
cleanup: change ondisk committed

Patch has no functional change.

8 years agocleanup: rename vg_ondisk to vg_committed
Zdenek Kabelac [Tue, 24 Nov 2015 22:29:18 +0000 (23:29 +0100)]
cleanup: rename vg_ondisk to vg_committed

Unifying terminology.

Since all the metadata in-use are ALWAYS on disk - switch
to terminology  committed and precommitted.

Patch has no functional change inside.

8 years agothin: fix previous update of partial tree building
Zdenek Kabelac [Tue, 24 Nov 2015 22:24:11 +0000 (23:24 +0100)]
thin: fix previous update of partial tree building

We do want to preserve 'active' thin-pool,
so add this 'fake' layer only when activating.

TODO:  think how to use thin-pool without fake LV layer.

8 years agotests: improve teardown
Zdenek Kabelac [Mon, 23 Nov 2015 22:17:54 +0000 (23:17 +0100)]
tests: improve teardown

Do not try to execute vgremove, when test has left suspended devices.

8 years agotests: data correctness after thin-pool resize
Zdenek Kabelac [Fri, 20 Nov 2015 21:28:21 +0000 (22:28 +0100)]
tests: data correctness after thin-pool resize

8 years agocleanup: use display_lvname
Zdenek Kabelac [Sun, 22 Nov 2015 22:03:01 +0000 (23:03 +0100)]
cleanup: use display_lvname

Switch debug msg to use display_lvname.
Link to VG early, so we have access to VG from LV.

8 years agothin: skip detach preload from pools
Zdenek Kabelac [Sun, 22 Nov 2015 22:04:11 +0000 (23:04 +0100)]
thin: skip detach preload from pools

lv preload for detached LVs started to be used also
for various other types which just happens to pass through
weak if() condition.

TODO: find here better solution to rather explicitly check
for types we really need to preload.

8 years agocleanup: move towards using direct LV pointers
Zdenek Kabelac [Sat, 21 Nov 2015 22:31:44 +0000 (23:31 +0100)]
cleanup: move towards using direct LV pointers

We do not won't to 'expose'  internals of VG struct.
ATM we use lists to keep all LVs - we may want to switch
to better struct for quicker 'search'.

Since we do not need 'lists' but always actual LV,
switch find_lv_in_vg_by_lvid() to return LV,
and replaces some use case of  find_lv_in_vg()
with 'better' working find_lv() which already
returns LV.

8 years agothin: work with active thin-pool
Zdenek Kabelac [Mon, 23 Nov 2015 18:53:43 +0000 (19:53 +0100)]
thin: work with active thin-pool

When 'lvextend -L+XX vg/thinpool'  do not leave inactive table
loaded for 'wrapping' LV on top of resized thin-pool
(ATM we use linear  LV for this with same size as thin-pool).

8 years agomemlock: add more libs on ignore list
Zdenek Kabelac [Sat, 21 Nov 2015 23:26:06 +0000 (00:26 +0100)]
memlock: add more libs on ignore list

Udev recently start to 'link-in' major amount of useless libs.
(Seem to be faulty 'systemd' link-in all issue)
Anyway - avoid locking those libs in RAM.

8 years agolibdm: enhance thin-pool preload
Zdenek Kabelac [Mon, 23 Nov 2015 22:15:04 +0000 (23:15 +0100)]
libdm: enhance thin-pool preload

When preloading thin-pool device node for already
existing/running thin-pool do not resume such thin-pool.

This allows to properly schedule commit point for metadata,
when thin-pool data or metadata volume is resized.

8 years agolibdm: drop extra space from cache target line
Zdenek Kabelac [Mon, 23 Nov 2015 22:12:43 +0000 (23:12 +0100)]
libdm: drop extra space from cache target line

Extra space between 'cache' target and metadata device caused
string comparation being not equal and thus always causing
table reload even when uneeded.

8 years agoman lvmcache: include chunk size
David Teigland [Mon, 23 Nov 2015 17:57:41 +0000 (11:57 -0600)]
man lvmcache: include chunk size

8 years agopost-release
Alasdair G Kergon [Mon, 23 Nov 2015 03:40:34 +0000 (03:40 +0000)]
post-release

8 years agopre-release v2_02_135
Alasdair G Kergon [Mon, 23 Nov 2015 03:33:43 +0000 (03:33 +0000)]
pre-release

8 years agotests: more cache conversion checks
Zdenek Kabelac [Thu, 19 Nov 2015 13:31:58 +0000 (14:31 +0100)]
tests: more cache conversion checks

8 years agocache: lvconvert repairs only thin pools
Zdenek Kabelac [Thu, 19 Nov 2015 12:32:03 +0000 (13:32 +0100)]
cache: lvconvert repairs only thin pools

Avoid internal error message where thin pool repair code tries to
fix cache pool - was catched later in code stack, so rather
catch this early and make the repair function exlusive
to thin pools.

So far we have no code for repairing cache pools
(other then the automatic during activation/deactivation).

8 years agocache: enable raid conversion for _cdata and _cmeta
Zdenek Kabelac [Thu, 19 Nov 2015 12:30:55 +0000 (13:30 +0100)]
cache: enable raid conversion for _cdata and _cmeta

Since thin-pool supports convertion of data and metadata LV,
enable the same for cache data and metadata LV.

8 years agotests: stacktrace on skip if message is empty
Marian Csontos [Thu, 19 Nov 2015 11:11:58 +0000 (12:11 +0100)]
tests: stacktrace on skip if message is empty

8 years agotests: add missing --skip option and S env.variable
Marian Csontos [Thu, 19 Nov 2015 09:48:17 +0000 (10:48 +0100)]
tests: add missing --skip option and S env.variable

8 years agocleanup: cast resulting value explicitely
Zdenek Kabelac [Thu, 19 Nov 2015 10:59:19 +0000 (11:59 +0100)]
cleanup: cast resulting value explicitely

8 years agocleanup: add stack traces
Zdenek Kabelac [Wed, 18 Nov 2015 08:15:45 +0000 (09:15 +0100)]
cleanup: add stack traces

8 years agocleanup: use display_lvname in pmspare
Zdenek Kabelac [Wed, 18 Nov 2015 08:14:24 +0000 (09:14 +0100)]
cleanup: use display_lvname in pmspare

Just switch to use display_lvname().
Also squeeze possibly failing strncpy into INTERNAL_ERROR
as lvname always should fit.

8 years agolibdm: report: consolidate use of string list selection structures
Peter Rajnoha [Wed, 18 Nov 2015 09:54:09 +0000 (10:54 +0100)]
libdm: report: consolidate use of string list selection structures

8 years agotests: update lvmcache-exercise
David Teigland [Tue, 17 Nov 2015 18:05:22 +0000 (12:05 -0600)]
tests: update lvmcache-exercise

To handle multiple VGs with the same name.
Simply using the VG name is ambiguous, and
lvmetad requires the VG uuid be used to
specify which one is meant.

8 years agocoverity: trying different model
Zdenek Kabelac [Tue, 17 Nov 2015 17:58:15 +0000 (18:58 +0100)]
coverity: trying different model

Model reseting of given set, but it still makes
FD_SET to think it's accessing uninitialized value.

Maybe model also FD_SET.

8 years agocleanup: use embeded list
Zdenek Kabelac [Tue, 17 Nov 2015 12:38:17 +0000 (13:38 +0100)]
cleanup: use embeded list

Skip pointer and put list into selection_str_list.

8 years agocleanup: more readable code
Zdenek Kabelac [Tue, 17 Nov 2015 12:15:39 +0000 (13:15 +0100)]
cleanup: more readable code

Simplify if() expression.
Rename 'this' to 'vg'..

8 years agocleanup: add some test for NULL
Zdenek Kabelac [Tue, 17 Nov 2015 12:21:22 +0000 (13:21 +0100)]
cleanup: add some test for NULL

Coverity here is a bit 'blind' here and cannot resolve which
code paths are actually able to hit this code path.
(It's using 'statistic' to resolve all possible paths,
and it's not scanning 'individual' code paths.)

This just cleans warns and add 'cheap' tests.

8 years agocleanup: do not call vg_read with NULL mda
Zdenek Kabelac [Tue, 17 Nov 2015 12:23:28 +0000 (13:23 +0100)]
cleanup: do not call vg_read with NULL mda

Use 'mda' instead of NULL to quite Coverity warn.
However this code seems to be actually not even possible to hit.
With proper analysis it may possibly be dropped from code to
simplify logic.

8 years agocleanup: unify NULL custom check
Zdenek Kabelac [Tue, 17 Nov 2015 12:19:39 +0000 (13:19 +0100)]
cleanup: unify NULL custom check

Unify testing of NULL custom pointer.
Resolve 'factor' only in required if() branch.

8 years agoraid: drop unneeded NULL test
Zdenek Kabelac [Tue, 17 Nov 2015 12:17:59 +0000 (13:17 +0100)]
raid: drop unneeded NULL test

Skip testing target_pvs for NULL, we already
dereference it in many other places.
If check would ever be needed - it needs to be
in front of _raid_extract_images().

8 years agolibdm: update error message
Zdenek Kabelac [Mon, 16 Nov 2015 13:39:09 +0000 (14:39 +0100)]
libdm: update error message

Correcting error message.

8 years agohash: change name of new lookup function
David Teigland [Tue, 17 Nov 2015 17:59:44 +0000 (11:59 -0600)]
hash: change name of new lookup function

8 years agolvmetad: improve error message for VGs with same name
David Teigland [Tue, 17 Nov 2015 15:33:50 +0000 (09:33 -0600)]
lvmetad: improve error message for VGs with same name

8 years agolvmetad: different style for hash functions
David Teigland [Tue, 17 Nov 2015 16:19:04 +0000 (10:19 -0600)]
lvmetad: different style for hash functions

In lookup, return a count of entries with the
same key rather than the value from a second
entry with the same key.

Using some slightly different names.

8 years agolvmetad: add error explaining duplicate VG names
David Teigland [Mon, 16 Nov 2015 22:23:28 +0000 (16:23 -0600)]
lvmetad: add error explaining duplicate VG names

When a VG name lookup fails because the name matches
multiple VGs, return an explanatory error.

8 years agolvmetad: fix some error logging
David Teigland [Mon, 16 Nov 2015 21:08:52 +0000 (15:08 -0600)]
lvmetad: fix some error logging

For some errors old_meta may not be set, so
check before logging it.

8 years agolvmetad: use lookup_withval in another location
David Teigland [Mon, 16 Nov 2015 20:44:32 +0000 (14:44 -0600)]
lvmetad: use lookup_withval in another location

Simply use lookup_withval right away rather than doing a
standard lookup, checking for the wrong mapping, then
repeating with lookup_withval to get the right mapping.

8 years agolvmetad: remove unneeded FIXME
David Teigland [Mon, 16 Nov 2015 19:44:57 +0000 (13:44 -0600)]
lvmetad: remove unneeded FIXME

This case is now handled correctly.

8 years agohash: add comment about multiple values
David Teigland [Mon, 16 Nov 2015 17:01:53 +0000 (11:01 -0600)]
hash: add comment about multiple values

8 years agolibdm: fix check of pointer
Zdenek Kabelac [Mon, 16 Nov 2015 10:51:43 +0000 (11:51 +0100)]
libdm: fix check of pointer

Ahhh being blind here - wanted to check the pointer before dereference
not a dereferenced one.

8 years agolibdm: better error reporting from dm_split_lvm_name
Zdenek Kabelac [Mon, 16 Nov 2015 12:07:36 +0000 (13:07 +0100)]
libdm: better error reporting from dm_split_lvm_name

Report errors from all error paths correctly.
Validate passed args before dereferencing them.

8 years agocoverity: model FD_ZERO
Zdenek Kabelac [Fri, 13 Nov 2015 19:11:52 +0000 (20:11 +0100)]
coverity: model FD_ZERO

Coverity is not able to understand assembly language in
system's header file, so provide model for such macro.

Note: to really see model in-use: #nodef FD_ZERO model_FD_ZERO
need to go to coverity/config/user_nodefs.h

8 years agodebug: lvconvert add missing display_lvname
Zdenek Kabelac [Fri, 13 Nov 2015 22:38:34 +0000 (23:38 +0100)]
debug: lvconvert add missing display_lvname

Add missing display_lvname in _lvconvert_merge_thin_snapshot().

Also when we detect missing origin, report Internal error,
which would likely be the primary fault here
(and avoid dereft of NULL origin as noticed by Coverity).

8 years agocleanup: just alphabetically sort links
Zdenek Kabelac [Sat, 14 Nov 2015 21:14:37 +0000 (22:14 +0100)]
cleanup: just alphabetically sort links

8 years agocleanup: simplify dev_cache_exit
Zdenek Kabelac [Sat, 6 Dec 2014 22:56:14 +0000 (23:56 +0100)]
cleanup: simplify dev_cache_exit

Just set whole _cache struct into unitialized state just
like with lib init start usage.
Lists are initialized with dev_cache_init().

8 years agocleanup: add _free on error path
Zdenek Kabelac [Sat, 6 Dec 2014 22:55:25 +0000 (23:55 +0100)]
cleanup: add _free on error path

Just like with failing allocation above also _free(dev).

TODO: rework this to always use mempool and drop unneeded
comlexity we have in this function.

8 years agoformat-text: ensure no division by zero
Zdenek Kabelac [Mon, 16 Nov 2015 00:04:21 +0000 (01:04 +0100)]
format-text: ensure no division by zero

Coverity likes here to be 100% sure no division by zero is possible.
Add check for alignment !=0 which is made on other code paths here.

8 years agoconfig: check vdef pointer before dereference
Zdenek Kabelac [Sun, 15 Nov 2015 23:42:29 +0000 (00:42 +0100)]
config: check vdef pointer before dereference

Coverity notices we check for v_def != NULL elsewhere, so it thinks
it may be possibly NULL also here.

8 years agolibdm: check for passed custom time value
Zdenek Kabelac [Sun, 15 Nov 2015 23:41:25 +0000 (00:41 +0100)]
libdm: check for passed custom time value

Coverity reports custom should be checked before derefernce.

8 years agolibdm: check for null from pool strdup
Zdenek Kabelac [Sun, 15 Nov 2015 23:00:32 +0000 (00:00 +0100)]
libdm: check for null from pool strdup

Unlikely to happen, but Coverity shown we may have possible
derefer NULL pointer.

8 years agolibdm: check if passed return pointer is not NULL
Zdenek Kabelac [Sun, 15 Nov 2015 23:13:10 +0000 (00:13 +0100)]
libdm: check if passed return pointer is not NULL

Coverity: before storing return value, check passed space will
not dereference NULL pointer.

8 years agoman: improve cmirrord.8 manpage
Stéphane Aulery [Thu, 27 Nov 2014 01:32:38 +0000 (02:32 +0100)]
man: improve cmirrord.8 manpage

- Keywords in bold
- Add syslog and signal ref.
- Sort see also sections

Signed-off-by: Stéphane Aulery <saulery@free.fr>
8 years agoclvmd: remove -v option from getopt
Stéphane Aulery [Tue, 25 Nov 2014 01:57:22 +0000 (02:57 +0100)]
clvmd: remove -v option from getopt

-V is documented, not -v.

Signed-off-by: Stéphane Aulery <saulery@free.fr>
8 years agocache: handle older metadata format
Zdenek Kabelac [Sun, 15 Nov 2015 19:03:08 +0000 (20:03 +0100)]
cache: handle older metadata format

When reading older lvm2 metadata for cache-pool - we now handle more
extended syntax - basically we want to enter most setting when
actually creating cached LV.

For this new validation code has been added. However older metadata
without new settings set is now found as invalid.

Fix it by adding default settings for  cache policy  mq
and cache mode  writethrough.

8 years agolvmetad: change the new hash to take data len
David Teigland [Fri, 13 Nov 2015 22:54:22 +0000 (16:54 -0600)]
lvmetad: change the new hash to take data len

If the data len is passed into the hash table
and saved there, then the hash table internals
do not need to assume that the data value is
a string at any point.

8 years agotests: allow lvmetad tests with duplicate VG names
David Teigland [Fri, 13 Nov 2015 21:09:26 +0000 (15:09 -0600)]
tests: allow lvmetad tests with duplicate VG names

8 years agolvmetad: handle duplicate VG names
David Teigland [Thu, 12 Nov 2015 16:05:56 +0000 (10:05 -0600)]
lvmetad: handle duplicate VG names

New hash table functions are added that allow for
multiple entries with the same key.  Use of the
vgname_to_vgid hash table is converted to these
new functions since there are multiple entries
in vgname_to_vgid that have the same key (vgname).

When multiple VGs with the same name exist, commands
that reference only a VG name will fail saying the
VG could not be found (that error message could be
improved.)  Any command that works with the select
option can access one of the VGs with -S vg_uuid=X.
vgrename is a special case that allows the first VG
name arg to be replaced by a uuid, which also works.

(The existing hash table implementation is not well
suited for handling this case, but it works ok with
the new extensions.  Changing lvmetad to use its own
custom hash tables may be preferable at some point.)

8 years agopvmove: Remove unused find_pvmove_lv_from_pvname.
Alasdair G Kergon [Fri, 13 Nov 2015 18:06:08 +0000 (18:06 +0000)]
pvmove: Remove unused find_pvmove_lv_from_pvname.

8 years agocoverity: add few internal errors
Zdenek Kabelac [Fri, 13 Nov 2015 08:49:59 +0000 (09:49 +0100)]
coverity: add few internal errors

Mark impossible paths with internal errors.
Also replace 'strcmp() with more readable seg_is...()

8 years agocoverity: model some function
Zdenek Kabelac [Wed, 11 Nov 2015 21:03:42 +0000 (22:03 +0100)]
coverity: model some function

Reduce number of false-positives and model functions in a way
Coverity is able to understand it.

8 years agocoverity: hint
Zdenek Kabelac [Fri, 13 Nov 2015 08:47:14 +0000 (09:47 +0100)]
coverity: hint

Here Coverity cannot see the pointer cannot be NULL in this
code path - opened coverity case #00531860.

We could make a model to avoid seeing related reports,
but then we loose coverage for modeled function.

So decided to add minor hint for this case.

8 years agotests: without delay_dev skip some checks
Zdenek Kabelac [Fri, 13 Nov 2015 09:00:57 +0000 (10:00 +0100)]
tests: without delay_dev skip some checks

When delay_dev is missing these tests are just racy.

8 years agocleanup: better error message
Zdenek Kabelac [Fri, 13 Nov 2015 10:05:00 +0000 (11:05 +0100)]
cleanup: better error message

Use display_lvname.

8 years agocleanup: check LVs in one statement
Zdenek Kabelac [Wed, 11 Nov 2015 21:06:27 +0000 (22:06 +0100)]
cleanup: check LVs in one statement

Use a single statement to check all LVs we want to
deref via  get_only_segment_using_this_lv().

8 years agocleanup: missing check for PV2
Zdenek Kabelac [Wed, 11 Nov 2015 21:05:52 +0000 (22:05 +0100)]
cleanup: missing check for PV2

Patch missed also check this pointer dereference.

8 years agocleanup: drop unneded check for mem
Zdenek Kabelac [Wed, 11 Nov 2015 19:45:53 +0000 (20:45 +0100)]
cleanup: drop unneded check for mem

Revert missed to drop this extra check.

8 years agodebug: put stack on error path
Zdenek Kabelac [Wed, 11 Nov 2015 21:04:44 +0000 (22:04 +0100)]
debug: put stack on error path

At least check result and trace it.
However we may need better error reaction in this case.

8 years agoraid: ensure area_count is at least 2
Zdenek Kabelac [Fri, 13 Nov 2015 09:59:58 +0000 (10:59 +0100)]
raid: ensure area_count is at least 2

Enusure we will not divide by 0.

8 years agolibdm: put in secure check
Zdenek Kabelac [Wed, 11 Nov 2015 21:51:23 +0000 (22:51 +0100)]
libdm: put in secure check

Coverity complains about NULL deref - while this cannot currently
happen, put in secure INTERNAL_ERROR.

8 years agoreporter: add missing stack trace
Zdenek Kabelac [Wed, 11 Nov 2015 21:07:39 +0000 (22:07 +0100)]
reporter: add missing stack trace

Use goto_out on error paths.

8 years agolvmetad: tail chasing to shut up coverity
David Teigland [Thu, 12 Nov 2015 15:35:41 +0000 (09:35 -0600)]
lvmetad: tail chasing to shut up coverity

8 years agodmeventd: fix check for failing open.
Zdenek Kabelac [Wed, 11 Nov 2015 18:54:08 +0000 (19:54 +0100)]
dmeventd: fix check for failing open.

Recent change 2c8d6f5c90d5be62b48ba2881f2a6631091dc5af
actually droped restart when the reason of failing open is missing
device completely - check for ENOENT now as another reason
to start new dmeventd server  (when there is no systemd to maintain it).

8 years agostr_list: do not support str lists without mempools
Peter Rajnoha [Wed, 11 Nov 2015 15:09:39 +0000 (16:09 +0100)]
str_list: do not support str lists without mempools

Do not support str lists without mempools. Instead, create temporary
mempool where necessary (currently only _get_report_options fn).

8 years agoconfigure: check for udev_device_get_is_initialized is available
Peter Rajnoha [Wed, 11 Nov 2015 14:15:34 +0000 (15:15 +0100)]
configure: check for udev_device_get_is_initialized is available

The udev_device_get_is_initialized is available since libudev version
165. Older versions are still used somewhere (e.g. RHEL6). So better
check for this fn and use it only if it's available.

8 years agodev-ext: issue error if external_device_info_source=udev and udev db record incomplete
Peter Rajnoha [Wed, 11 Nov 2015 12:13:54 +0000 (13:13 +0100)]
dev-ext: issue error if external_device_info_source=udev and udev db record incomplete

Udev db records are marked as not initialized (incomplete) on timeout.
Issue an error message whenever LVM finds such records so users are
aware that something's going wrong with udev db.

This is important in case we use devices/external_device_info_source="udev"
where udev database records are used to do various filtering decisions.

For example:

udev log of timed out worker:

Nov 11 13:02:25 raw.virt systemd-udevd[607]: seq 1997 '/devices/virtual/block/dm-2' is taking a long time
Nov 11 13:04:25 raw.virt systemd-udevd[607]: seq 1997 '/devices/virtual/block/dm-2' killed
Nov 11 13:04:25 raw.virt systemd-udevd[607]: worker [11221] terminated by signal 9 (Killed)
Nov 11 13:04:25 raw.virt systemd-udevd[607]: worker [11221] failed while handling '/devices/virtual/block/dm-2'
...

LVM also issues error message visibly if incomplete udev db record is found,
devices/external_device_info_source="udev" is set:

$ pvs
  Udev database has incomplete information about device /dev/dm-2.
  Failed to get external handle for device /dev/dm-2 [udev].
  ...

8 years agolibdm: reorder error path
Zdenek Kabelac [Tue, 10 Nov 2015 20:34:31 +0000 (21:34 +0100)]
libdm: reorder error path

Coverity noticed recent fix of an error path missed to
release 'dmt' - reoder code to ensure 'dmt' is released.

8 years agoraid: fix the string compare
Zdenek Kabelac [Tue, 10 Nov 2015 20:32:46 +0000 (21:32 +0100)]
raid: fix the string compare

Coverity noticed this condition is always false and the error
path could never be visited.

So check for all mismatches of supported messages
and actually mark log_error as internal error.

8 years agocoverity: Add placeholder modelling file.
Alasdair G Kergon [Tue, 10 Nov 2015 01:37:11 +0000 (01:37 +0000)]
coverity: Add placeholder modelling file.

8 years agolibdm: replace assign with increment
Zdenek Kabelac [Mon, 9 Nov 2015 21:48:13 +0000 (22:48 +0100)]
libdm: replace assign with increment

Coverity didn't liked assign with && expression, so use trick.
It does not complain against this prefix incremenent operation.

8 years agovgrename: check if new and old names match
David Teigland [Mon, 9 Nov 2015 19:23:59 +0000 (13:23 -0600)]
vgrename: check if new and old names match

When the first arg is a UUID and vgrename translates
that UUID to a current VG name, the old and new VG
names are not being checked for equality.  If they
are equal, it produces an internal error rather than
a proper error.

8 years agolvmetad: change recent cleanups
David Teigland [Mon, 9 Nov 2015 18:17:06 +0000 (12:17 -0600)]
lvmetad: change recent cleanups

with better alternatives.

8 years agolvmlockd: reverse some unnecessary checking
David Teigland [Mon, 9 Nov 2015 17:50:44 +0000 (11:50 -0600)]
lvmlockd: reverse some unnecessary checking

These are unnecessary or not useful.

8 years agotests: handle missing delay_dev
Zdenek Kabelac [Mon, 9 Nov 2015 18:06:55 +0000 (19:06 +0100)]
tests: handle missing delay_dev

Try to run as much of test which could run without delay_dev.

8 years agolvmlockd: fix the NO_GL_LS condition
David Teigland [Mon, 9 Nov 2015 17:33:16 +0000 (11:33 -0600)]
lvmlockd: fix the NO_GL_LS condition

indicating when no global lockspace exists.

8 years agocleanup: ensuring string is not NULL
Zdenek Kabelac [Mon, 9 Nov 2015 15:58:24 +0000 (16:58 +0100)]
cleanup: ensuring string is not NULL

Coverity cannot see the string cannot be NULL so make it explicit.

8 years agocache: ensure there is no NULL str
Zdenek Kabelac [Mon, 9 Nov 2015 15:56:11 +0000 (16:56 +0100)]
cache: ensure there is no NULL str

Coverity is not smart enough to detect this case could never happen.

8 years agolvmlockd: enforce 64bit arithmetic
Zdenek Kabelac [Mon, 9 Nov 2015 15:47:57 +0000 (16:47 +0100)]
lvmlockd: enforce 64bit arithmetic

Coverity suggest to stay on the 'safe' side and widen operators early
so 64bit offset is made from 64bit arithmentic.

8 years agolvmlockd: add missing error checks
Zdenek Kabelac [Mon, 9 Nov 2015 15:38:14 +0000 (16:38 +0100)]
lvmlockd: add missing error checks

Detect error from function and report them.

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