]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agopre-release v2_02_120
Alasdair G Kergon [Fri, 15 May 2015 22:19:29 +0000 (23:19 +0100)]
pre-release

9 years agomirror: use proper 64bit constants
Zdenek Kabelac [Fri, 15 May 2015 20:53:12 +0000 (22:53 +0200)]
mirror: use proper 64bit constants

ed2a08bf25e3b4e6a88c55402ab5dc11061ad68e missed to use 64bit
constants.

9 years agospec: new man page
Zdenek Kabelac [Fri, 15 May 2015 19:14:25 +0000 (21:14 +0200)]
spec: new man page

9 years agoconfig: remove UNDEFINED from cache_pool_cachemode
David Teigland [Fri, 15 May 2015 19:24:23 +0000 (14:24 -0500)]
config: remove UNDEFINED from cache_pool_cachemode

Replace UNDEFINED with COMMENTED because the code
requires a value to be returned from the config.

9 years agoconfig: remove UNDEFINED from thin_pool_discards and thin_pool_zero
David Teigland [Fri, 15 May 2015 19:01:23 +0000 (14:01 -0500)]
config: remove UNDEFINED from thin_pool_discards and thin_pool_zero

Replace UNDEFINED with COMMENTED for these two since
undefined seems to break things.

9 years agolvmpolld.8.in: man page rewrite
Ondrej Kozina [Thu, 14 May 2015 17:33:27 +0000 (19:33 +0200)]
lvmpolld.8.in: man page rewrite

- add client functionality
- fill in long option variants

9 years agolvmpolld: don't return success on invalid option
Ondrej Kozina [Fri, 15 May 2015 17:28:23 +0000 (19:28 +0200)]
lvmpolld: don't return success on invalid option

9 years agolvmpolld: add long option variants for all short ones
Ondrej Kozina [Fri, 15 May 2015 17:18:32 +0000 (19:18 +0200)]
lvmpolld: add long option variants for all short ones

9 years agolvmpolld: introduce client functionality
Ondrej Kozina [Fri, 15 May 2015 16:47:25 +0000 (18:47 +0200)]
lvmpolld: introduce client functionality

as of now lvmpolld works as client utility for
querying running instance of lvmpolld server
on metadata, state, etc.

Currently the only request implemented is the '--dump'.
It prints out full lvmpolld state (mimics lvmdump -p command).

9 years agopvmove.c: relocate id components extraction
Ondrej Kozina [Fri, 15 May 2015 15:06:14 +0000 (17:06 +0200)]
pvmove.c: relocate id components extraction

we don't want to fail properly set pvmove after metadata
update. failure to copy id components could end with dangling
mirror moving PV segments but no monitoring from lvmpolld or
classical polldaemon.

9 years agolvpoll.c: harden the checks for proper LV name
Ondrej Kozina [Fri, 15 May 2015 14:35:00 +0000 (16:35 +0200)]
lvpoll.c: harden the checks for proper LV name

lvpoll now process passed LV name properly. It respects
LVM_VG_NAME env. variable and is able to process LV name
passed in various formats:

- VG/LV
- LV name only (with LVM_VG_NAME set)
- /dev/mapper/VG-LV
- /dev/VG/LV

9 years agolvpoll.c: replace arg_count with arg_is_set
Ondrej Kozina [Fri, 15 May 2015 14:45:02 +0000 (16:45 +0200)]
lvpoll.c: replace arg_count with arg_is_set

didn't need to count the occurence but check if set

9 years agoexample.conf.in: apply previous improvements to example.conf
David Teigland [Fri, 15 May 2015 12:28:30 +0000 (14:28 +0200)]
example.conf.in: apply previous improvements to example.conf

9 years agoconfig_settings.h: improve lvmpolld config description
David Teigland [Fri, 15 May 2015 12:26:50 +0000 (14:26 +0200)]
config_settings.h: improve lvmpolld config description

9 years agolvm.8.in: add reference to lvpoll built-in command
Ondrej Kozina [Fri, 15 May 2015 11:38:55 +0000 (13:38 +0200)]
lvm.8.in: add reference to lvpoll built-in command

9 years agolvmdump.8.in: describe lvmpolld related option
Ondrej Kozina [Fri, 15 May 2015 11:38:38 +0000 (13:38 +0200)]
lvmdump.8.in: describe lvmpolld related option

9 years agocommands.h: reorder lvpoll options
Ondrej Kozina [Thu, 14 May 2015 17:33:54 +0000 (19:33 +0200)]
commands.h: reorder lvpoll options

9 years agolvm-lvpoll.8.in: man page for built-in command
Ondrej Kozina [Fri, 15 May 2015 18:16:51 +0000 (20:16 +0200)]
lvm-lvpoll.8.in: man page for built-in command

9 years agolvmpolld.8.in: hide origin of lvmpolld man page
Ondrej Kozina [Thu, 14 May 2015 16:43:50 +0000 (18:43 +0200)]
lvmpolld.8.in: hide origin of lvmpolld man page

:)

9 years agolvmpolld-client.c: explain known return codes
Ondrej Kozina [Thu, 14 May 2015 14:44:31 +0000 (16:44 +0200)]
lvmpolld-client.c: explain known return codes

lvmpolld returns few well known return codes. Explain
these to users and suggest reading lvmpolld log files
for more details

9 years agolvmpolld: label known return codes
Ondrej Kozina [Thu, 14 May 2015 13:53:29 +0000 (15:53 +0200)]
lvmpolld: label known return codes

so that lvmpolld-client can decode and describe these
return codes properly

9 years agolibdaemon: fprintf(stderr...) -> ERROR()
Ondrej Kozina [Thu, 14 May 2015 13:50:16 +0000 (15:50 +0200)]
libdaemon: fprintf(stderr...) -> ERROR()

log data structures are ready. so why not pass
error messages through ERROR()

9 years agolibdaemon: suggest daemon already running
Ondrej Kozina [Thu, 14 May 2015 13:43:43 +0000 (15:43 +0200)]
libdaemon: suggest daemon already running

when dm_creat_lockfile fails, it's probably due to
another instance is holding the same pid file...

9 years agoconfig: thin_pool_chunk_size_policy should be commented
David Teigland [Fri, 15 May 2015 16:43:56 +0000 (11:43 -0500)]
config: thin_pool_chunk_size_policy should be commented

It is commented in existing example.conf, so leave
that as it was.

9 years agoconfig: thin_pool_chunk_size_policy is not undefined
David Teigland [Fri, 15 May 2015 16:37:16 +0000 (11:37 -0500)]
config: thin_pool_chunk_size_policy is not undefined

The default policy setting does not depend on any
system/kernel values.

9 years agoman: missed y|n for wipesignatures
Zdenek Kabelac [Fri, 15 May 2015 15:43:15 +0000 (17:43 +0200)]
man: missed y|n for wipesignatures

9 years agoconfig: add comments to match current example.conf
David Teigland [Thu, 14 May 2015 21:08:50 +0000 (16:08 -0500)]
config: add comments to match current example.conf

Use CFG_DEFAULT_COMMENTED and CFG_DEFAULT_UNDEFINED to
replicate the existing comments in example.conf.

Fix host_list to be cfg_array.

UNDEFINED is only used if the value depends on other
system/kernel values outside of lvm.  The most common
case is when dm-thin or dm-cache have built-in default
settings in the kernel, and lvm will use those built-in
default values unless the corresponding lvm config setting
is set.

COMMENTED is used to comment out the default setting in
lvm.conf.  The effect is that if the LVM version is
upgraded, and the new version of LVM has new built-in
default values, the new defaults are used by LVM unless
the previous default value was set (uncommented) in lvm.conf.

9 years agolibdm: new dm_task_get_info with internal_suspend
Zdenek Kabelac [Fri, 15 May 2015 13:29:46 +0000 (15:29 +0200)]
libdm: new dm_task_get_info with internal_suspend

Introduce new implmentation of dm_task_get_info() function
with support for reading internal_suspend.
.
This time it is done in a 'versioned' way.

We keep the old fashion dm_task_get_info(Base) to implement
the old behavior of 1.02.95 libdm code.

libdm version 1.02.96 introduced 'macro' wrapper
dm_task_get_info_with_deferred_remove with new implementation
of dm_task_get_info() - we cannot do anything else then to
provide compatible version of this symbol.

Now in version 1.02.97 we add new versioned implementation of
dm_task_get_info(DM_1_02_97) symbol.

This has the effect that i.e. rpm build will finaly resolve proper
dependency on a new symbol - so it will be no longer possible,
to build a new binary and use old library
(rpm -q --provides will show libdevmapper.so.1.02(DM_1_02_97)(64bit))

Also the history is now tracked. If a new function is added (or
reimplemented), it needs to be placed in proper file,
so it could be exported with right versioning symbol.
File .exported_symbols.Base should and any existing older DM
should be treated as read-only after a release.

Also - only libdm has been currently enhanced with versioned .Base
file, as soon as other libs (liblvm, libdevmapper-event) needs changes
they should also get their exported symbol files - meanwhile
make.tmpl handles both cases.

9 years agolvm.conf: add more information to the comment header
David Teigland [Thu, 14 May 2015 15:52:24 +0000 (10:52 -0500)]
lvm.conf: add more information to the comment header

9 years agoconfig: description can refer to etc location
David Teigland [Thu, 14 May 2015 14:47:42 +0000 (09:47 -0500)]
config: description can refer to etc location

9 years agoconfig: avoid configurable description text
David Teigland [Thu, 14 May 2015 14:25:48 +0000 (09:25 -0500)]
config: avoid configurable description text

It's just simpler to avoid configurable values in
the description text by rewording to avoid them.

9 years agonix: socat for f18, nc for f17
Zdenek Kabelac [Thu, 14 May 2015 13:01:01 +0000 (15:01 +0200)]
nix: socat for f18, nc for f17

Use common f17_f18 and add extras for f17 and f18

9 years agomakefiles: disable po file targes
Zdenek Kabelac [Thu, 14 May 2015 12:18:36 +0000 (14:18 +0200)]
makefiles: disable po file targes

po targets are not correct - so disable them for now.

9 years agomakefiles: use srcdir
Zdenek Kabelac [Thu, 14 May 2015 12:17:33 +0000 (14:17 +0200)]
makefiles: use srcdir

Use -I$(srcdir) as that's what we really want here.
For %.pot use all includes.

9 years agonix: drop util-linux
Zdenek Kabelac [Thu, 14 May 2015 09:45:37 +0000 (11:45 +0200)]
nix: drop util-linux

Doesn't appear on centos???

9 years agonix: add more packages
Zdenek Kabelac [Thu, 14 May 2015 09:42:33 +0000 (11:42 +0200)]
nix: add more packages

9 years agospec: package old sysv initscript for lvmpolld
Zdenek Kabelac [Thu, 14 May 2015 09:27:52 +0000 (11:27 +0200)]
spec: package old sysv initscript for lvmpolld

9 years agonix: add pkgconfig
Zdenek Kabelac [Thu, 14 May 2015 09:15:20 +0000 (11:15 +0200)]
nix: add pkgconfig

Install for better config

9 years agotests: respect @CONFDIR@/machine-id
Zdenek Kabelac [Thu, 14 May 2015 08:51:34 +0000 (10:51 +0200)]
tests: respect @CONFDIR@/machine-id

Obtain location of machine-id.

NOTE: lvmconfig cannot dump 'life' value - should be fixed.

9 years agotests: do not use |&
Zdenek Kabelac [Thu, 14 May 2015 08:20:24 +0000 (10:20 +0200)]
tests: do not use |&

Bash 3.2  doesn't understand this syntax (i.e. RHEL5).
And it's even better - reports syntax error and return success.

9 years agonix: socat is quite new package
Zdenek Kabelac [Thu, 14 May 2015 07:49:54 +0000 (09:49 +0200)]
nix: socat is quite new package

Install 'nc' on older systems.
Test suite handles both.

9 years agoconf: system_id_source is referencing CONFDIR
Zdenek Kabelac [Thu, 14 May 2015 08:50:21 +0000 (10:50 +0200)]
conf: system_id_source is referencing CONFDIR

Since we allow to configure /etc in configure and compile-in
dir for /etc we need to properly advertise this location later.

9 years agomakefiles: protect CFLAGS
Zdenek Kabelac [Wed, 13 May 2015 21:43:50 +0000 (23:43 +0200)]
makefiles: protect CFLAGS

When CFLAGS and LDFLAGS are passed into - protect them,
and avoid even recursive subdir 'extension' of them.

9 years agomakefiles: assign vars before include
Zdenek Kabelac [Wed, 13 May 2015 21:42:17 +0000 (23:42 +0200)]
makefiles: assign vars before include

Before we include, set INCLUDE and TARGETS.
Extend CFLAGS after include.

9 years agomakefiles: drop DEBUG mangling
Zdenek Kabelac [Wed, 13 May 2015 19:33:17 +0000 (21:33 +0200)]
makefiles: drop DEBUG mangling

DEBUG is already set through make.tmpl.

9 years agoconfigure: set optimize flags when CFLAGS is unset
Zdenek Kabelac [Wed, 13 May 2015 19:30:20 +0000 (21:30 +0200)]
configure: set optimize flags when CFLAGS is unset

If we are given CFLAGS - preserve user's request and avoid placing
just -O2 there.

9 years agoconfigure: preserve CXX/CFLAGS
Zdenek Kabelac [Wed, 13 May 2015 19:23:24 +0000 (21:23 +0200)]
configure: preserve CXX/CFLAGS

AC_PROG_CC
AC_PROG_CXX

Does not preserve CFLAGS CXXFLAGS

9 years agonix: fix socat package name
Zdenek Kabelac [Wed, 13 May 2015 19:22:08 +0000 (21:22 +0200)]
nix: fix socat package name

9 years agomakefiles: use fullpath when in assign
Zdenek Kabelac [Wed, 13 May 2015 13:43:55 +0000 (15:43 +0200)]
makefiles: use fullpath when in assign

We need to put full path right in the assign moment,
otherwise command:

make rpm rpmbuild=/my/tmp/dir

cannot work as one would have expected.

9 years agomakefiles: testclient is not valid target
Zdenek Kabelac [Wed, 13 May 2015 12:22:46 +0000 (14:22 +0200)]
makefiles: testclient is not valid target

9 years agomakefiles: drop way too generic deps
Zdenek Kabelac [Wed, 13 May 2015 12:22:18 +0000 (14:22 +0200)]
makefiles: drop way too generic deps

9 years agolibdaemon: Fix socket reuse error paths.
Alasdair G Kergon [Wed, 13 May 2015 12:42:09 +0000 (13:42 +0100)]
libdaemon: Fix socket reuse error paths.

Invert S_ISSOCK validation.
Fail instead of replacing a symlink with a new socket.
After failure, skip calling fcntl with invalid socket_fd.

9 years agoconfigure: start to use AS_IF
Zdenek Kabelac [Tue, 12 May 2015 12:46:36 +0000 (14:46 +0200)]
configure: start to use AS_IF

9 years agonix: more base packages
Zdenek Kabelac [Tue, 12 May 2015 12:33:14 +0000 (14:33 +0200)]
nix: more base packages

9 years agospec: packaging polld
Zdenek Kabelac [Wed, 13 May 2015 11:14:54 +0000 (13:14 +0200)]
spec: packaging polld

Package lvmpolld

Drop legacy SysV init subpackage.

9 years agolvmpolld: dump cleanup
Ondrej Kozina [Tue, 12 May 2015 15:05:45 +0000 (17:05 +0200)]
lvmpolld: dump cleanup

9 years agolvmpolld-client.c: use lvmpolld debug class where appropriate
Ondrej Kozina [Tue, 12 May 2015 14:28:42 +0000 (16:28 +0200)]
lvmpolld-client.c: use lvmpolld debug class where appropriate

9 years agotests: remove forgotten -vvvv option
Ondrej Kozina [Tue, 12 May 2015 14:00:08 +0000 (16:00 +0200)]
tests: remove forgotten -vvvv option

9 years agolibdm-common.c: remove trailing whitespace
Ondrej Kozina [Tue, 12 May 2015 13:28:38 +0000 (15:28 +0200)]
libdm-common.c: remove trailing whitespace

9 years agolvmpolld-client.c: be more specific about fallback on error
Ondrej Kozina [Tue, 12 May 2015 13:34:45 +0000 (15:34 +0200)]
lvmpolld-client.c: be more specific about fallback on error

if client fails to contact lvmpolld it fallbacks to using classical
polldaemon. Be more specific and give some hints to users what went
possibly wrong

9 years agonew debug class for lvmpolld client code
Ondrej Kozina [Tue, 12 May 2015 13:26:26 +0000 (15:26 +0200)]
new debug class for lvmpolld client code

9 years agolvmpolld.8.in: clarify the timeout parameter
Ondrej Kozina [Tue, 12 May 2015 08:20:39 +0000 (10:20 +0200)]
lvmpolld.8.in: clarify the timeout parameter

Remove references to systemd native service. Now
the libdaemon supports shutdown on idle no matter
the init process implementation installed.

9 years agolibdaemon: shutdown on idle also in non-systemd environment
Ondrej Kozina [Tue, 12 May 2015 07:37:19 +0000 (09:37 +0200)]
libdaemon: shutdown on idle also in non-systemd environment

9 years agotests: ndev by default
Zdenek Kabelac [Mon, 11 May 2015 18:04:35 +0000 (20:04 +0200)]
tests: ndev by default

9 years agoconfigure: spec.inc is generated at build
Zdenek Kabelac [Tue, 12 May 2015 10:07:44 +0000 (12:07 +0200)]
configure: spec.inc is generated at build

Collect all needed info at runtime for spec.inc

9 years agomakefiles: use LN_S
Zdenek Kabelac [Mon, 11 May 2015 19:47:39 +0000 (21:47 +0200)]
makefiles: use LN_S

9 years agomakefiles: runtime spec.inc
Zdenek Kabelac [Mon, 11 May 2015 19:48:11 +0000 (21:48 +0200)]
makefiles: runtime spec.inc

Support  CLEAN_DIRS
Var for rpmbuilddir
Use LN_S
Generate spec.inc at runtime for 'make rpm'.

9 years agotests: remove forgotten set -v in aux
Ondrej Kozina [Mon, 11 May 2015 16:49:24 +0000 (18:49 +0200)]
tests: remove forgotten set -v in aux

9 years agolvmpolld: by default spawn lvpoll cmd with -An
Ondrej Kozina [Mon, 11 May 2015 13:22:18 +0000 (15:22 +0200)]
lvmpolld: by default spawn lvpoll cmd with -An

9 years agolvmpolld: set use counters properly in lvmpolld_store
Ondrej Kozina [Mon, 11 May 2015 12:19:11 +0000 (14:19 +0200)]
lvmpolld: set use counters properly in lvmpolld_store

set active_polling_count to zero in pdst_init fn

9 years agolib/polldaemon.h: remove trailing whitespace
Ondrej Kozina [Mon, 11 May 2015 11:39:16 +0000 (13:39 +0200)]
lib/polldaemon.h: remove trailing whitespace

9 years agolvmdump.sh: print out lvmpolld service status
Ondrej Kozina [Mon, 11 May 2015 11:31:43 +0000 (13:31 +0200)]
lvmdump.sh: print out lvmpolld service status

9 years agotests: split flavours
Zdenek Kabelac [Mon, 11 May 2015 15:30:23 +0000 (17:30 +0200)]
tests: split flavours

Remove duplicate flavour-udev-lvmetad-lvmpolld
and put them 1-per-line.

9 years agonix: now some files are generate so keep them
Zdenek Kabelac [Mon, 11 May 2015 15:29:21 +0000 (17:29 +0200)]
nix: now some files are generate so keep them

more tweaks ahead

9 years agovgimport: fall back when lvmetad is not running
David Teigland [Mon, 11 May 2015 14:28:47 +0000 (09:28 -0500)]
vgimport: fall back when lvmetad is not running

If lvmetad is configured, but not running,
vgimport would not fall back and run without
lvmetad, but would report an error about
requiring lvmetad.

9 years agotests: typo in aux
Zdenek Kabelac [Mon, 11 May 2015 14:14:24 +0000 (16:14 +0200)]
tests: typo in aux

Ooops editor grabbed q in test.

9 years agomakefiles: move clean
Zdenek Kabelac [Mon, 11 May 2015 14:08:58 +0000 (16:08 +0200)]
makefiles: move clean

Move clean: target below, so it's not a default target to execute.

9 years agomakefile: cleanup after build
Zdenek Kabelac [Mon, 11 May 2015 13:52:11 +0000 (15:52 +0200)]
makefile: cleanup after build

Provide cleaning rules for build dir and release tgz.

9 years agotests: disable lvmetad and lvmpolld
Zdenek Kabelac [Mon, 11 May 2015 13:45:34 +0000 (15:45 +0200)]
tests: disable lvmetad and lvmpolld

Since now we enable those by default when compiled with those daemons,
explicitely disable them in tests when needed.

Alphabetically sort configurables.

9 years agospec: now generated
Zdenek Kabelac [Mon, 11 May 2015 12:30:54 +0000 (14:30 +0200)]
spec: now generated

9 years agomakefiles: dist and rpm target
Zdenek Kabelac [Mon, 11 May 2015 12:28:55 +0000 (14:28 +0200)]
makefiles: dist and rpm target

Basic support for upstream 'build' of rpm packages.
Make spec file generated.

2 new simple targets:

make dist  - create LVM2.MAJOR.MINOR.PATCHLEVEL.tgz  from git files.

make rpm   - some generic rpmbuilder using spec files.
             Create packages in build/ subdir.
             DO NOT USE created rpms in any distribution!

9 years agospec: writable instalation
Zdenek Kabelac [Mon, 11 May 2015 11:51:49 +0000 (13:51 +0200)]
spec: writable instalation

rpmbuild needs writable binaries (for debug symbol extraction)

9 years agoconfigure: use_lvmetad/polld configurable
Zdenek Kabelac [Mon, 11 May 2015 11:49:41 +0000 (13:49 +0200)]
configure: use_lvmetad/polld configurable

Configure provides proper settings for
use_lvmetad  and use_lvmpolld  conf setttings.

When the build of polld & lvmetad, these settings
are enabled by default unless explicitelly disabled
with --disable-use-lvmetad/--disable-use-lvmpolld.

9 years agometadata: use log_debug_metadata instead of general log_debug for BA debug messages
Peter Rajnoha [Mon, 11 May 2015 09:07:53 +0000 (11:07 +0200)]
metadata: use log_debug_metadata instead of general log_debug for BA debug messages

9 years agotests: missed conversion
Zdenek Kabelac [Sat, 9 May 2015 07:15:29 +0000 (09:15 +0200)]
tests: missed conversion

Assuming it should test same number as other functions.

9 years agotests: avoid clobering dmesg
Zdenek Kabelac [Fri, 8 May 2015 20:43:06 +0000 (22:43 +0200)]
tests: avoid clobering dmesg

Restore old harness access to /dev/kmsg.

9 years agocleanup: drop extra test for NULL
Zdenek Kabelac [Fri, 8 May 2015 21:01:32 +0000 (23:01 +0200)]
cleanup: drop extra test for NULL

vg cannot be NULL here - it's been already used in the code above.

9 years agocleanup: remove extraneous parentheses
Zdenek Kabelac [Fri, 8 May 2015 20:58:00 +0000 (22:58 +0200)]
cleanup: remove extraneous parentheses

9 years agolvmpolld: Add standalone polldaemon.
Ondrej Kozina [Fri, 8 May 2015 23:59:18 +0000 (00:59 +0100)]
lvmpolld: Add standalone polldaemon.

See doc/lvmpolld_overview.txt

9 years agolvmcache: set device in label when switching devs V2
David Teigland [Fri, 8 May 2015 22:10:53 +0000 (17:10 -0500)]
lvmcache: set device in label when switching devs V2

This is an alternative/equivalent to commit
ca67cf84df6015c990618de3dc45c0b87eee75ce

The problem (wrong label->dev after a new preferred
duplicate device is chosen) was isolated to the lvmetad
case (non-lvmetad worked fine), and this fixes the problem
by setting the new label->dev in the lvmetad-specific
code rather than in the general lvmcache code.

9 years agolvmcache: set device in label when switching devs
David Teigland [Fri, 8 May 2015 19:38:26 +0000 (14:38 -0500)]
lvmcache: set device in label when switching devs

When using lvmetad, the reporter code was not reporting
the new preferred device because the new preferred dev
was not being set in the label struct.

9 years agotests: better filter
Zdenek Kabelac [Fri, 8 May 2015 18:44:43 +0000 (20:44 +0200)]
tests: better filter

Filter $PREFIX rather then just LVMTEST.

9 years agotests: missing vg
Zdenek Kabelac [Fri, 8 May 2015 17:17:00 +0000 (19:17 +0200)]
tests: missing vg

9 years agotoollib: avoid repeated lvmetad vg_lookup
David Teigland [Tue, 5 May 2015 21:24:50 +0000 (16:24 -0500)]
toollib: avoid repeated lvmetad vg_lookup

In process_each_{vg,lv,pv} when no vgname args are given,
the first step is to get a list of all vgid/vgname on the
system.  This is exactly what lvmetad returns from a
vg_list request.  The current code is doing a vg_lookup
on each VG after the vg_list and populating lvmcache with
the info for each VG.  These preliminary vg_lookup's are
unnecessary, because they will be done again when the
processing functions call vg_read.  This patch eliminates
the initial round of vg_lookup's, which can roughly cut in
half the number of lvmetad requests and save a lot of extra work.

9 years agolvmcache: choose preferred device once
David Teigland [Wed, 6 May 2015 19:49:44 +0000 (14:49 -0500)]
lvmcache: choose preferred device once

Once the preferred duplicate devices have been set in
lvmcache, don't attempt to pick preferred duplicates
again.

9 years agolvmcache: update lvmcache with alternate device
David Teigland [Tue, 5 May 2015 19:02:43 +0000 (14:02 -0500)]
lvmcache: update lvmcache with alternate device

When there are duplicate PVs, and one device
replaces another in lvmcache, use label_read
to update lvmcache for the new device.

9 years agodebug: extra validation of passed segment
Zdenek Kabelac [Thu, 7 May 2015 12:04:22 +0000 (14:04 +0200)]
debug: extra validation of passed segment

Always check if passed segment really is correct cache segment.
(Avoids derefernce of possibly NULL seg->pool_lv).

9 years agodebug: tracing error path
Zdenek Kabelac [Thu, 7 May 2015 10:37:15 +0000 (12:37 +0200)]
debug: tracing error path

9 years agodebug: show sys errors
Zdenek Kabelac [Thu, 7 May 2015 09:38:43 +0000 (11:38 +0200)]
debug: show sys errors

9 years agocleanup: use 64bit ulongs
Zdenek Kabelac [Thu, 7 May 2015 09:17:36 +0000 (11:17 +0200)]
cleanup: use 64bit ulongs

Use 64bit arithmetics for all numbers (Coverity).

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