]> sourceware.org Git - lvm2.git/log
lvm2.git
10 years agoman: add man page for lvm dumpconfig
Peter Rajnoha [Thu, 27 Mar 2014 13:01:15 +0000 (14:01 +0100)]
man: add man page for lvm dumpconfig

10 years agofix spurios char
Zdenek Kabelac [Thu, 27 Mar 2014 12:49:24 +0000 (13:49 +0100)]
fix spurios char

Mistyped char left in code.

10 years agotests: more pvchange options examined
Zdenek Kabelac [Thu, 27 Mar 2014 10:23:08 +0000 (11:23 +0100)]
tests: more pvchange options examined

10 years agotests: cover more commands
Zdenek Kabelac [Thu, 27 Mar 2014 10:22:23 +0000 (11:22 +0100)]
tests: cover more commands

Visit more code lines.

10 years agocleanup: indent change
Zdenek Kabelac [Wed, 26 Mar 2014 20:01:47 +0000 (21:01 +0100)]
cleanup: indent change

10 years agodebug: avoid warning when compiled with valgrind
Zdenek Kabelac [Thu, 27 Mar 2014 10:21:05 +0000 (11:21 +0100)]
debug: avoid warning when compiled with valgrind

Declare 'c' only when compiling without valgrind.
This cleans compiler warning about unused var when
compiled with valgrind pool support.

10 years agolv_manip: drop cmd pointer from for_each_sub_lv
Zdenek Kabelac [Thu, 27 Mar 2014 09:35:07 +0000 (10:35 +0100)]
lv_manip: drop cmd pointer from for_each_sub_lv

Drop unused passed cmd pointer from function.

TODO:

We have two similar functions (though not identical)

lv_manip.c: for_each_sub_lv()
metadata.c: _lv_each_dependency()

They seem to not always match - we should probably convert
to use only a single function.

10 years agolv_rename: validate renamed sublv
Zdenek Kabelac [Thu, 27 Mar 2014 09:35:51 +0000 (10:35 +0100)]
lv_rename: validate renamed sublv

Use proper vgmem memory pool for allocation of LV name in the vg
and check if new renamed LV is a valid name.

TODO: validation should really use also VG name, othewise we are not
able to tell "vgname-lvname" will be valid.

10 years agolvrename: fix exit code
Zdenek Kabelac [Thu, 27 Mar 2014 11:24:35 +0000 (12:24 +0100)]
lvrename: fix exit code

Return invalid cmd line (3) when error is detect on cmd line input.
Cmd failed (5) is used when command processing fails.

10 years agopvchange: fix exit code regression
Zdenek Kabelac [Thu, 27 Mar 2014 10:27:42 +0000 (11:27 +0100)]
pvchange: fix exit code regression

Commit 1a832398a7caa96faab2ccbac773cc4047c8f9c1 moved
some code from _pvchange_single() to main pvchange() and
introduced exit code regression as return codes have not
been properly changed, thus pvchange command exited
with '0' exit code, even though it has reported error.
Also there is a missing vg unlock in error path.

Fix it by counting the total number of expected calls before
checking for pvname and also unlock and relase vg when
pv is not found.

10 years agocleanup: easier casting
Zdenek Kabelac [Wed, 26 Mar 2014 13:02:31 +0000 (14:02 +0100)]
cleanup: easier casting

Use 32bit for extent calcs.
Drop uneeded implicit case.

10 years agocleanup: simplify pv name size estimation
Zdenek Kabelac [Wed, 26 Mar 2014 13:00:51 +0000 (14:00 +0100)]
cleanup: simplify pv name size estimation

Reuse buffer with size of 2 * PATH_MAX to handle worst case escape
and avoid extra calculation of espaced len.

10 years agocleanup: lvmetad use dm_hash_iterator
Zdenek Kabelac [Wed, 26 Mar 2014 12:59:13 +0000 (13:59 +0100)]
cleanup: lvmetad use dm_hash_iterator

Simplify code with the use of dm_hash_iterator

10 years agoman: colorization fixes
Zdenek Kabelac [Wed, 26 Mar 2014 13:04:44 +0000 (14:04 +0100)]
man: colorization fixes

Fix style

10 years agoman: add repair info for thin pools
Zdenek Kabelac [Wed, 26 Mar 2014 13:04:14 +0000 (14:04 +0100)]
man: add repair info for thin pools

Document lvconvert --repair for thin pools.

10 years agolvmetad: Fix an endless wait loop introduced in c13f5dbb.
Petr Rockai [Wed, 26 Mar 2014 10:42:42 +0000 (11:42 +0100)]
lvmetad: Fix an endless wait loop introduced in c13f5dbb.

10 years agotests: missed exclusive activation
Zdenek Kabelac [Tue, 25 Mar 2014 23:22:23 +0000 (00:22 +0100)]
tests: missed exclusive activation

10 years agotests: pass list devs to allocate from
Zdenek Kabelac [Tue, 25 Mar 2014 22:56:15 +0000 (23:56 +0100)]
tests: pass list devs to allocate from

10 years agotests: cover code from more commands
Zdenek Kabelac [Tue, 25 Mar 2014 22:55:45 +0000 (23:55 +0100)]
tests: cover code from more commands

10 years agotests: check forced backup
Zdenek Kabelac [Tue, 25 Mar 2014 22:55:04 +0000 (23:55 +0100)]
tests: check forced backup

10 years agotests: disable test for broken kernel raid targe
Zdenek Kabelac [Tue, 25 Mar 2014 22:56:46 +0000 (23:56 +0100)]
tests: disable test for broken kernel raid targe

Since using raid5 - validate it's usable on the system

10 years agotests: remove also 3.14 fc21 kernels
Zdenek Kabelac [Tue, 25 Mar 2014 19:13:25 +0000 (20:13 +0100)]
tests: remove also 3.14 fc21 kernels

10 years agolvmetad: Wait at least 80s for the initial scan.
Petr Rockai [Tue, 25 Mar 2014 14:53:36 +0000 (15:53 +0100)]
lvmetad: Wait at least 80s for the initial scan.

10 years agolvmetad: add missing dev_close in error path
Zdenek Kabelac [Tue, 25 Mar 2014 13:53:06 +0000 (14:53 +0100)]
lvmetad: add missing dev_close in error path

Fixes missing dev_close() in dev_read error path
introduced in commit
a36869867275b8ef0f6d324bc5a7f3e2b8e445e9
3e5bec37e9cec455f20656858ba510b69010676d

(in-release fix)

10 years agolvmdump: add lvm dumpconfig --type diff/missing
Peter Rajnoha [Tue, 25 Mar 2014 12:06:59 +0000 (13:06 +0100)]
lvmdump: add lvm dumpconfig --type diff/missing

For a quick overview of config when debugging and to quickly check
which values are different from defaults and which are not defined
in the config and for which defaults are used.

10 years agopvresize: fail exit code for negative size
Zdenek Kabelac [Tue, 25 Mar 2014 10:52:03 +0000 (11:52 +0100)]
pvresize: fail exit code for negative size

Pvresize with negative value retuns invalid cmd line exit code.

10 years agotests: wipe signature
Zdenek Kabelac [Tue, 25 Mar 2014 08:59:43 +0000 (09:59 +0100)]
tests: wipe signature

Check for usable blkid.

10 years agotests: update
Zdenek Kabelac [Mon, 24 Mar 2014 22:13:35 +0000 (23:13 +0100)]
tests: update

10 years agotests: use exclusive activation
Zdenek Kabelac [Mon, 24 Mar 2014 09:33:26 +0000 (10:33 +0100)]
tests: use exclusive activation

pvmove in cluster needs exlusive activation or cmirrord running.

10 years agotests: argless pvremove
Zdenek Kabelac [Mon, 24 Mar 2014 09:01:25 +0000 (10:01 +0100)]
tests: argless pvremove

10 years agotests: more pvresize tests
Zdenek Kabelac [Mon, 24 Mar 2014 09:00:39 +0000 (10:00 +0100)]
tests: more pvresize tests

Maybe move to separate pvresize test,
remove vgck size this is already executed elsewhere.

10 years agotests: relocate vgimport test
Zdenek Kabelac [Mon, 24 Mar 2014 08:58:29 +0000 (09:58 +0100)]
tests: relocate vgimport test

It seem like a better-fit here.

10 years agodebug: add proper backtrace debug
Zdenek Kabelac [Mon, 24 Mar 2014 19:31:14 +0000 (20:31 +0100)]
debug: add proper backtrace debug

When failure happens inside refresh, print proper debug backtrace.

10 years agocleanup: drop init of already zalloced mem
Zdenek Kabelac [Mon, 24 Mar 2014 08:22:59 +0000 (09:22 +0100)]
cleanup: drop init of already zalloced mem

10 years agocleanup: use dm_free without extra test
Zdenek Kabelac [Mon, 24 Mar 2014 08:20:18 +0000 (09:20 +0100)]
cleanup: use dm_free without extra test

It's ok to free(NULL).

10 years agocleanup: use trigraph
Zdenek Kabelac [Mon, 24 Mar 2014 09:01:44 +0000 (10:01 +0100)]
cleanup: use trigraph

10 years agocleanup: initilization of vars
Zdenek Kabelac [Mon, 24 Mar 2014 08:19:56 +0000 (09:19 +0100)]
cleanup: initilization of vars

10 years agocleanup: indent
Zdenek Kabelac [Mon, 24 Mar 2014 08:19:37 +0000 (09:19 +0100)]
cleanup: indent

10 years agocleanup: use NULL for pointer reset
Zdenek Kabelac [Mon, 24 Mar 2014 08:18:53 +0000 (09:18 +0100)]
cleanup: use NULL for pointer reset

10 years agoclvmd: validate open device state
Zdenek Kabelac [Tue, 25 Mar 2014 09:17:34 +0000 (10:17 +0100)]
clvmd: validate open device state

If clvmd does not hold any lock, it should also not keep any opened
device.

The reason for this patch is, that refresh_toolcontext calls
dev_cache_exit() which destroys whole device cache (even those with
opened file) - previous patch added recovery path to avoid memory
corruption, but opened files are still bugs that need to be fixed.

So this patch certainly kills many internal mirror & raid tests,
since they leak opened file descriptors (when tests are executed
with 'abort_on_error').

10 years agoclvmd: hardening leak on exit
Zdenek Kabelac [Tue, 25 Mar 2014 09:50:36 +0000 (10:50 +0100)]
clvmd: hardening leak on exit

Operate with lvm_thread_exit while holding lvm_thread_mutex.
Don't leave unfinished work in the lvm thread queue
and always finish all queued tasks before exit,
so no cmd struct is left in the list.

(in-release fix)

10 years agodev-cache: fix mem corruption on refresh context
Zdenek Kabelac [Tue, 25 Mar 2014 09:53:42 +0000 (10:53 +0100)]
dev-cache: fix mem corruption on refresh context

When lvm2 command works with clvmd and uses locking in wrong way,
it may 'leak' certain file descriptors in opened (incorrect) state.

dev_cache_exit then destroys memory pool of cached devices, while
_open_devices list in dev-io.c was still referencing them if they
were still opened.

Patch properly calls _close() function to 'self-heal' from this
invalid state, but it will report internal error (so execution
with abort_on_internal_error causes immediate death). On the
normal 'execution', error is only reported, but memory state is
corrected, and linked list is not referencing devices from
released mempool.

For crash see: https://bugzilla.redhat.com/show_bug.cgi?id=1073886

10 years agoWHATS_NEW: commit f12ee43
Peter Rajnoha [Tue, 25 Mar 2014 10:00:44 +0000 (11:00 +0100)]
WHATS_NEW: commit f12ee43

10 years agolibdaemon: fix misleading "WARNING: Ignoring unsupported value for expected." when...
Peter Rajnoha [Mon, 24 Mar 2014 15:47:08 +0000 (16:47 +0100)]
libdaemon: fix misleading  "WARNING: Ignoring unsupported value for expected." when communicating with daemon

When we're trying to search for certain tree node
in daemon's reply, we default to a blank string ""
if the node is not found. This happens during lvmetad
initialization.

However, when the default blank string is used, we
can't use dm_config_find_str at the same time - the
dm_config_find_str_allow_empty should be used instead.
Otherwise a a warning message:

  "WARNING: Ignoring unsupported value for ..."

is issued.

10 years agoconfig: define default value for global/thin_disabled_features as NULL instead
Peter Rajnoha [Mon, 24 Mar 2014 15:31:27 +0000 (16:31 +0100)]
config: define default value for global/thin_disabled_features as NULL instead

Before:
  thin_disabled_features = ""
Now:
  thin_disabled_features = []

Which is a more correct and consistent way of specifying void array
though parses can handle both forms.

10 years agoconfig: also check empty arrays for difference against default values
Peter Rajnoha [Mon, 24 Mar 2014 15:30:47 +0000 (16:30 +0100)]
config: also check empty arrays for difference against default values

10 years agodumpconfig: add dumpconfig --type diff to show differences from defaults
Peter Rajnoha [Mon, 24 Mar 2014 12:19:15 +0000 (13:19 +0100)]
dumpconfig: add dumpconfig --type diff to show differences from defaults

10 years agoconfig: add support for comparing used config values with default ones
Peter Rajnoha [Fri, 21 Mar 2014 09:43:44 +0000 (10:43 +0100)]
config: add support for comparing used config values with default ones

10 years agocleanup: move _get_def_array_values fn
Peter Rajnoha [Mon, 24 Mar 2014 12:21:41 +0000 (13:21 +0100)]
cleanup: move _get_def_array_values fn

So we can use reuse it for the code that will follow...

10 years agodev-swap: use SECTOR_SHIFT
Zdenek Kabelac [Sat, 22 Mar 2014 19:43:05 +0000 (20:43 +0100)]
dev-swap: use SECTOR_SHIFT

10 years agodev-swap: detect swap signature on devices smaller then 2MB
Zdenek Kabelac [Sat, 22 Mar 2014 19:36:14 +0000 (20:36 +0100)]
dev-swap: detect swap signature on devices smaller then 2MB

Smallest supported size for swap device is 40KB, however current
test skipped devices smaller then 4096 sectors (2MB).

Since page is in bytes, convert it to sectors before comparing
with device size (in sectors).

10 years agoWHATS_NEW update
Zdenek Kabelac [Fri, 21 Mar 2014 21:00:54 +0000 (22:00 +0100)]
WHATS_NEW update

10 years agotests: wait for clvmd.pid file
Zdenek Kabelac [Fri, 21 Mar 2014 10:38:20 +0000 (11:38 +0100)]
tests: wait for clvmd.pid file

Just like with dmeventd and lvmetad.
Do few indent changes around.

10 years agotests: simplify
Zdenek Kabelac [Wed, 19 Mar 2014 22:33:01 +0000 (23:33 +0100)]
tests: simplify

10 years agotests: add quotes around device paths
Zdenek Kabelac [Wed, 19 Mar 2014 22:32:25 +0000 (23:32 +0100)]
tests: add quotes around device paths

10 years agocleanup: clvmd add more info debug message
Zdenek Kabelac [Thu, 20 Mar 2014 13:24:06 +0000 (14:24 +0100)]
cleanup: clvmd add more info debug message

10 years agocleanup: clvmd uses struct initializers
Zdenek Kabelac [Fri, 21 Mar 2014 11:56:56 +0000 (12:56 +0100)]
cleanup: clvmd uses struct initializers

Code easier to read

10 years agocleanup: clvmd zombie removal loop
Zdenek Kabelac [Fri, 21 Mar 2014 11:56:35 +0000 (12:56 +0100)]
cleanup: clvmd zombie removal loop

Simplier code to start scan from the next node,
and remove matching pipe client.

10 years agocleanup: clvmd reindent read_from_local_sock
Zdenek Kabelac [Thu, 20 Mar 2014 13:45:39 +0000 (14:45 +0100)]
cleanup: clvmd reindent read_from_local_sock

Shift indent of else branch to right since
error path returns in the front.
(Simplier to read)

10 years agocleanup: clvmd indent change
Zdenek Kabelac [Fri, 21 Mar 2014 11:56:01 +0000 (12:56 +0100)]
cleanup: clvmd indent change

Plain indent changes.

10 years agocleanup: clvmd dump_messages
Zdenek Kabelac [Thu, 20 Mar 2014 09:22:41 +0000 (10:22 +0100)]
cleanup: clvmd dump_messages

10 years agocleanup: clvmd update log_error
Zdenek Kabelac [Thu, 20 Mar 2014 08:21:34 +0000 (09:21 +0100)]
cleanup: clvmd update log_error

Drop \n from log_error() and add '.'

10 years agocleanup: clvmd drop goto
Zdenek Kabelac [Thu, 20 Mar 2014 08:18:10 +0000 (09:18 +0100)]
cleanup: clvmd drop goto

10 years agocleanup: clvmd skip reset of null pointer
Zdenek Kabelac [Wed, 19 Mar 2014 22:37:47 +0000 (23:37 +0100)]
cleanup: clvmd skip reset of null pointer

10 years agocleanup: clvmd move destroy_lvhash into main
Zdenek Kabelac [Thu, 20 Mar 2014 13:06:16 +0000 (14:06 +0100)]
cleanup: clvmd move destroy_lvhash into main

Keep destruction code path consistent and simple and
destroy lvhash in the place it's been created.
Also issue debug message from a single place.

10 years agocleanup: memlock line indent
Zdenek Kabelac [Thu, 20 Mar 2014 12:44:03 +0000 (13:44 +0100)]
cleanup: memlock line indent

10 years agosinglenode: reset pointer when hash is destroyed
Zdenek Kabelac [Wed, 19 Mar 2014 22:34:11 +0000 (23:34 +0100)]
singlenode: reset pointer when hash is destroyed

Just keep pointer consistent.

10 years agoclvmd: drop dead code
Zdenek Kabelac [Fri, 21 Mar 2014 15:50:45 +0000 (16:50 +0100)]
clvmd: drop dead code

Since pipe_client has been already reset to NULL,
remove this dead code.

10 years agoclvmd: drop unused local_sock parameter
Zdenek Kabelac [Fri, 21 Mar 2014 10:34:25 +0000 (11:34 +0100)]
clvmd: drop unused local_sock parameter

10 years agoclvmd: update add_reply_to_list
Zdenek Kabelac [Thu, 20 Mar 2014 13:29:42 +0000 (14:29 +0100)]
clvmd: update add_reply_to_list

Take mutex lock after the allocation just before
the structure is merged into reply list.

10 years agoclvmd: use dm_malloc
Zdenek Kabelac [Thu, 20 Mar 2014 08:24:45 +0000 (09:24 +0100)]
clvmd: use dm_malloc

Use libdm malloc wrapper functions.

10 years agoclvmd: move call of cluster_closedown
Zdenek Kabelac [Fri, 21 Mar 2014 20:19:54 +0000 (21:19 +0100)]
clvmd: move call of cluster_closedown

We have to close cluster in some predicatable way,
otherwise we may access released memory from different
threads.

So move closedown till the point we know all thread
are closed. New messages from cluster are discarded.

10 years agoclvmd: move destroy_lvm into lvm thread
Zdenek Kabelac [Thu, 20 Mar 2014 13:23:03 +0000 (14:23 +0100)]
clvmd: move destroy_lvm into lvm thread

Since lvm was initialized in lvm thread call destroy there as well.

10 years agoclvmd: add special lvm thread exit
Zdenek Kabelac [Fri, 21 Mar 2014 17:01:38 +0000 (18:01 +0100)]
clvmd: add special lvm thread exit

When multiple threads act on the same 'quit' variable
the order of exit becomes unpredictable.

So let the main_loop() finish first and then clean up
all queued lvm jobs.

Do not add any new work, when lvm_thread_exit is set.

10 years agoclvmd: always set cleanup_needed
Zdenek Kabelac [Fri, 21 Mar 2014 10:46:50 +0000 (11:46 +0100)]
clvmd: always set cleanup_needed

When thread is created, set the cleanup_needed flag
immediately so it could be used properly any time later
when cleanup_zombie() is needed.

10 years agoclvmd: fix clean memory on exit
Zdenek Kabelac [Fri, 21 Mar 2014 16:07:57 +0000 (17:07 +0100)]
clvmd: fix clean memory on exit

Properly clean 'client' structure only for LOCAL_SOCK type.
(Fixes bug from commit 460c19df621d35260caceec7f598da1566263cd4)
(in release fix)

Also cleanup-up associated pthreads by using cleanup_zombie() function.
Since this function may change the list, restart scanning always from
the list header.

Note: couple following patches are necessary to make this working properly.

10 years agomemlock: drop locked mem in critical section
Zdenek Kabelac [Thu, 20 Mar 2014 12:53:39 +0000 (13:53 +0100)]
memlock: drop locked mem in critical section

When daemon releases memory and it is still in critical
section, issue an error message and drop memory.

We cannot do anything better for now and we at least
release allocated resource.

FIXME:

This code is triggered when i.e. clvmd is killed while
some LVs are suspend - in this case suspended devices leak,
so if this happens during i.e. clvmd upgrade we have
unresolved problem - even locked rootfs...

10 years agoactivate: report release with critical section
Zdenek Kabelac [Thu, 20 Mar 2014 09:31:21 +0000 (10:31 +0100)]
activate: report release with critical section

This function is typically called for cmd context refresh or destroy.
On the non-clustered case we already unlocked all messages,
however when i.e. 'clvmd' gets break signal it may have
still couple messages queued.

For now just report an error.

10 years agolvmcache: fix debug trace
Zdenek Kabelac [Wed, 19 Mar 2014 22:35:36 +0000 (23:35 +0100)]
lvmcache: fix debug trace

Recent debug tracing commit introduce read of uninitialized memory,
since VGID is not really a proper string which ends with '\0'.
Enforce at most 32 (ID_LEN) chars are read from vgid.
(in release fix)

10 years agolvmcache: handle reinit without error
Zdenek Kabelac [Fri, 21 Mar 2014 21:26:39 +0000 (22:26 +0100)]
lvmcache: handle reinit without error

Since commit f12ee43f2eaba5d38b1925a5a34b1746c1d66985 call destroy,
it start to check all VGs are unlocked. However when we become_daemon,
we simply reset locking (since lock is still kept by parent process).
So implement a simple 'reset' flag.

10 years agocmirrord: Clean-up stray warning message (attempt #2)
Jonathan Brassow [Wed, 19 Mar 2014 19:43:00 +0000 (14:43 -0500)]
cmirrord: Clean-up stray warning message (attempt #2)

There are two types of CPG communications in a corosync cluster:
messages and state transitions.  Cmirrord processes the state
transitions first.

When a cluster mirror issues a POSTSUSPEND, it signals the end of
cluster communication with the rest of the nodes in the cluster.
The POSTSUSPEND marks the last communication of the 'message'
type that will go around the cluster.  The node then calls
cpg_leave which causes a final 'state transition' communication to
all of the nodes.  Once the out-going node receives its own state
transition notice from the cluster, it finalizes the leave.  At this
point, the state of the log is 'INVALID'; but it is possible that
there remains some cluster trafic that was queued up behind the
state transition that still wants to be processed.  It is harmless
to attempt to dispatch any remaining messages - they won't be
delivered because the node is no longer in the cluster.  However,
there was a warning message that was being printed in this case
that is now removed by this patch.  The failure of the dispatch
created a false positive condition that triggered the message.

10 years agopolldaemon: Re-initialise lvmcache properly on fork (fixes RHBZ 1073670).
Petr Rockai [Wed, 19 Mar 2014 15:23:43 +0000 (16:23 +0100)]
polldaemon: Re-initialise lvmcache properly on fork (fixes RHBZ 1073670).

10 years agoWHATS_NEW: commit 5eef269
Peter Rajnoha [Wed, 19 Mar 2014 08:49:09 +0000 (09:49 +0100)]
WHATS_NEW: commit 5eef269

10 years agocleanup: add cmd_context reference to struct cft_check_handle
Peter Rajnoha [Wed, 19 Mar 2014 07:45:05 +0000 (08:45 +0100)]
cleanup: add cmd_context reference to struct cft_check_handle

So we have all things needed to do a configuration check packaged
in one handle. It makes function calls inside a bit more readable.

10 years agocleanup: indent
Zdenek Kabelac [Tue, 18 Mar 2014 23:24:09 +0000 (00:24 +0100)]
cleanup: indent

10 years agopvscan: cleanup updates
Zdenek Kabelac [Tue, 18 Mar 2014 23:19:01 +0000 (00:19 +0100)]
pvscan: cleanup updates

Simplify code:
 remove unneeded assignments
 use unsigned values for length

10 years agopvscan: fix report of long pv names
Zdenek Kabelac [Tue, 18 Mar 2014 23:17:36 +0000 (00:17 +0100)]
pvscan: fix report of long pv names

pvscan --uuid was broken since it was using only 128 char buffers
without checking any write size, so any longer device path leads to
crash.

Also ansure format is properly aligned into columns with this option.

10 years agocleanup: simplify pv name print
Zdenek Kabelac [Tue, 18 Mar 2014 23:01:00 +0000 (00:01 +0100)]
cleanup: simplify pv name print

pv_vg_name() now already hides orphans.

10 years agopv_vg_name: do not expose internal orphans to lvm2 users
Zdenek Kabelac [Tue, 18 Mar 2014 22:54:46 +0000 (23:54 +0100)]
pv_vg_name: do not expose internal orphans to lvm2 users

Check for orphan VG name and return just empty string,
Use internally pv->vg_name if the real orphan name is needed.

10 years agopvdisplay: fix man to refer to sectors, not KB
Thomas Fehr [Tue, 18 Mar 2014 08:24:01 +0000 (09:24 +0100)]
pvdisplay: fix man to refer to sectors, not KB

The PV size is displayed in sectors, not kilobytes
for 'pvdisplay -c'

Signed-off-by: Thomas Fehr <fehr@suse.de>
Acked-by: Hannes Reinecke <hare@suse.de>
10 years agopvdisplay: use log_print_unless_silent for info messages
Zdenek Kabelac [Tue, 18 Mar 2014 23:35:27 +0000 (00:35 +0100)]
pvdisplay: use log_print_unless_silent for info messages

10 years agometadata: print VG with invalid chars in quotes
Zdenek Kabelac [Tue, 18 Mar 2014 23:24:36 +0000 (00:24 +0100)]
metadata: print VG with invalid chars in quotes

We we report invalid chars, put quotes around vg name.

10 years agoclvmd: avoid resending local sync commands
Zdenek Kabelac [Tue, 18 Mar 2014 23:25:51 +0000 (00:25 +0100)]
clvmd: avoid resending local sync commands

Instead of sending repeatedly  LOCAL_SYNC commands to clvmds
like 'lvs', rememeber the last sent commmand, and if there was no other
clvmd command, drop this redundant SYNC call message.

The problem has started with commit:
56cab8cc037fc4d31085705987b3a4c04d5e5938

This introduced correct synchronisation of name, when user requests to know
open_count (needs to wait for udev), however it is also executed for
read-only cases like 'lvs' command.

For now implement very simple solution, which is only monitoring
outgoing clvmd command, and when sequence of LOCAL sync names are
recognized, they are skipped automatically.

TODO:
Future solution might move this variable info 'cmd_context' and
use  'needs_sync' flag also i.e. in file locking code.

10 years agofile_locking: use PATH_MAX for dir name
Zdenek Kabelac [Tue, 18 Mar 2014 23:22:18 +0000 (00:22 +0100)]
file_locking: use PATH_MAX for dir name

Using just 128 chars for locking dir may wail if longer
dir entry is used, swich to default linux max path.

10 years agoarchiver: drop unneeded backup check
Zdenek Kabelac [Tue, 18 Mar 2014 23:20:39 +0000 (00:20 +0100)]
archiver: drop unneeded backup check

When the backup is disabled, avoid testing backup presence.
This only leads to errors being logged in debug trace and the missing
backup can't be fixed, since it's disabled.

10 years agodumpconfig: fix memleak when using --mergedconfig
Peter Rajnoha [Tue, 18 Mar 2014 10:04:21 +0000 (11:04 +0100)]
dumpconfig: fix memleak when using --mergedconfig

Check whether lvm dumpconfig --mergedconfig is used only
with --type current (where we're merging current config and
the config supplied on command line). With other types
the config was merged, but it was thrown away since we're
generating other type of config anyway. This lead to a memleak.

Error out if --mergedconfig is used with anything else than
--type current (or without specifying --type in which case
the --type current is used by default).

10 years agotests: use check lv_tree_on
Zdenek Kabelac [Tue, 18 Mar 2014 09:26:42 +0000 (10:26 +0100)]
tests: use check lv_tree_on

Use internal /lib function.
Reduce extent size for test to create smaller devices.

10 years agotests: more fedora kernels unusable for testing raid456
Zdenek Kabelac [Mon, 17 Mar 2014 17:38:59 +0000 (18:38 +0100)]
tests: more fedora kernels unusable for testing raid456

10 years agolvmcache: add mode debug prints
Zdenek Kabelac [Tue, 18 Mar 2014 09:24:32 +0000 (10:24 +0100)]
lvmcache: add mode debug prints

Decorate NULL returns with debug_cache output so the
debug log doesn't contain spurios <bactrace> line without
any reason for it.

Add internal errors when cache is misused.

10 years agoconfig: make global/lvdisplay_shows_full_device_path profilable
Peter Rajnoha [Tue, 18 Mar 2014 08:49:53 +0000 (09:49 +0100)]
config: make global/lvdisplay_shows_full_device_path profilable

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