]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agovgimportclone: replace awk with dumpconfig to generate temporary lvm.conf for vgimpor...
Peter Rajnoha [Wed, 10 Dec 2014 12:25:23 +0000 (13:25 +0100)]
vgimportclone: replace awk with dumpconfig to generate temporary lvm.conf for vgimportclone

With current dumpconfig, we can generate lvm.conf easily - we can merge
current lvm.conf with the config given on cmd line:
  lvm dumpconfig --mergedconfig --config "..."

This is a bit simpler than using awk and it also avoids problems when some of
the configuration is missing in existing lvm.conf file and hardcoded defaults
are used instead. The dumpconfig handles this transparently.

9 years agoWHATS_NEW: f94f846 actually fixes DM issue, not LVM issue
Peter Rajnoha [Tue, 9 Dec 2014 09:52:07 +0000 (10:52 +0100)]
WHATS_NEW: f94f846 actually fixes DM issue, not LVM issue

9 years agolibdm: report: fix incorrect memory use while using --select with --unbuffered for...
Peter Rajnoha [Tue, 9 Dec 2014 09:36:27 +0000 (10:36 +0100)]
libdm: report: fix incorrect memory use while using --select with --unbuffered for reporting

Under certain circumstances, the selection code can segfault:

$ vgs --select 'pv_name=~/dev/sda' --unbuffered vg0
  VG   #PV #LV #SN Attr   VSize   VFree
  vg0    6   3   0 wz--n- 744.00m 588.00m
Segmentation fault (core dumped)

The problem here is the use of --ubuffered together with regex used in
selection criteria. If the report output is not buffered, each row is
discarded as soon as it is reported. The bug is in the use of report
handle's memory - in the example above, what happens is:

  1) report handle is initialized together with its memory pool

  2) selection tree is initialized from selection criteria string
     (using the report handle's memory pool!)

    2a) this also means the regex is initialized from report handle's mem pool

  3) the object (row) is reported

    3a) any memory needed for output is intialized out of report handle's mem pool
    3b) selection criteria matching is executed - if the regex is checked the
        very first time (for the very first row reported), some more memory
        allocation happens as regex allocates internal structures "on-demand",
        it's allocating from report handle's mem pool (see also step 2a)

  4) the report output is executed

  5) the object (row) is discarded, meaning discarding all the mem pool
     memory used since step 3.

Now, with step 5) we have discarded the regex internal structures from step 3b.
When we execute reporting for another object (row), we're using the same
selection criteria (step 3b), but tihs is second time we're using the regex
and as such, it's already initialized completely. But the regex is missing the
internal structures now as they got discarded in step 5) from previous
object (row) reporting (because we're using "unbuffered" reporting).

To resolve this issue and to prevent any similar future issues where each
object/row memory is discarded after output (the unbuffered reporting) while
selection tree is global for all the object/rows, use separate memory pool
for report's selection.

This patch replaces "struct selection_node *selection_root" in struct
dm_report with new struct selection which contains both "selection_root"
and "mem" for separate mem pool used for selection.

We can change struct dm_report this way as it is not exposed via libdevmapper.

(This patch will have even more meaning for upcoming patches where selection
is used even for non-reporting commands where "internal" reporting and
selection criteria matching happens and where the internal reporting is
not buffered.)

9 years agoconfigure: fix automatic use of configure --enable-udev-systemd-background-jobs
Peter Rajnoha [Mon, 8 Dec 2014 09:51:33 +0000 (10:51 +0100)]
configure: fix automatic use of configure --enable-udev-systemd-background-jobs

Fix incorrect test in configure which sets --enable-udev-systemd-background-jobs
automatically if proper systemd version is available.

The UDEV_SYSTEMD_BACKGROUND_JOBS variable was not properly set to "yes" in
case systemd is available and we had "maybe" for this variable before.

9 years agolibdm: report: return immediately from dm_report_compact_fields without error if...
Peter Rajnoha [Fri, 5 Dec 2014 14:10:50 +0000 (15:10 +0100)]
libdm: report: return immediately from dm_report_compact_fields without error if there are no rows

Let's make dm_report_compact_fields consistent with dm_report_output fn
which also returns with success immediately if there are no rows.

9 years agolibdm: report: compact output applicable only if report is buffered
Peter Rajnoha [Fri, 5 Dec 2014 13:18:32 +0000 (14:18 +0100)]
libdm: report: compact output applicable only if report is buffered

9 years agoraid: properly rename split image
Zdenek Kabelac [Thu, 4 Dec 2014 13:24:44 +0000 (14:24 +0100)]
raid: properly rename split image

When we split leg from raid - we take a proper new lock for a new LV.
However for now activation checks only 'existince' of device UUID,
but it's not validating device has a proper name.

As a quick fix call suspend()/resume() to rename after split mirror.

9 years agoconfig: add report/compact_output lvm.conf setting to enable or isable field compacting
Peter Rajnoha [Fri, 5 Dec 2014 10:46:26 +0000 (11:46 +0100)]
config: add report/compact_output lvm.conf setting to enable or isable field compacting

$ lvm dumpconfig report/compact_output
compact_output=0

$ lvs vg
  LV    VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol0 vg   owi-a-s--- 4.00m
  lvol1 vg   -wi-a----- 4.00m
  lvol2 vg   swi-a-s--- 4.00m      lvol0  0.00

$ lvm dumpconfig report/compact_output
compact_output=1

$ lvs vg
  LV    VG   Attr       LSize Origin Data%
  lvol0 vg   owi-a-s--- 4.00m
  lvol1 vg   -wi-a----- 4.00m
  lvol2 vg   swi-a-s--- 4.00m lvol0  0.00

9 years agolibdm: report: add dm_report_compact_fields
Peter Rajnoha [Fri, 5 Dec 2014 10:42:43 +0000 (11:42 +0100)]
libdm: report: add dm_report_compact_fields

Add new dm_report_compact_fields function to cause report outout
(dm_report_output) to ignore fields which don't have any value set
in any of the rows reported. This provides support for compact report
output where only fields which have something to report are displayed.

9 years agolibdm: remove unimplemented dm_report_set_output_selection fn
Peter Rajnoha [Fri, 5 Dec 2014 10:38:51 +0000 (11:38 +0100)]
libdm: remove unimplemented dm_report_set_output_selection fn

The dm_report_set_output_selection was not implemented in the end -
we have dm_report_init_with_selection instead. This is just a remnant
from development code that got into libdevmapper.h by mistake.

9 years agopool: fix typo in error message: then -> than
Peter Rajnoha [Thu, 4 Dec 2014 08:17:48 +0000 (09:17 +0100)]
pool: fix typo in error message: then -> than

9 years agomirror: Validate raid region size config setting.
Alasdair G Kergon [Wed, 3 Dec 2014 22:47:08 +0000 (22:47 +0000)]
mirror: Validate raid region size config setting.

If necessary, round down to a power of 2 the raid/mirror region size
taken from the config files.

9 years agomirror: Restrict region size to power of 2.
Alasdair G Kergon [Tue, 2 Dec 2014 14:24:21 +0000 (14:24 +0000)]
mirror: Restrict region size to power of 2.

9 years agopost-release
Alasdair G Kergon [Fri, 28 Nov 2014 23:07:31 +0000 (23:07 +0000)]
post-release

9 years agopre-release v2_02_114
Alasdair G Kergon [Fri, 28 Nov 2014 23:06:07 +0000 (23:06 +0000)]
pre-release

9 years agolibdaemon: Fix some client leaks.
Alasdair G Kergon [Fri, 28 Nov 2014 21:31:51 +0000 (21:31 +0000)]
libdaemon: Fix some client leaks.

Free (and clear) h.protocol string on daemon_open() error paths
so it's OK for caller to skip calling daemon_close() if returned
h.socket_fd is -1.

Close h.socket_fd in daemon_close() to avoid possible leak.

https://bugzilla.redhat.com/1164234

9 years agoUpdate WHATS_NEW.
Petr Rockai [Thu, 27 Nov 2014 19:23:57 +0000 (20:23 +0100)]
Update WHATS_NEW.

9 years agolvcreate: Implement --cachepolicy/--cachesettings.
Petr Rockai [Thu, 27 Nov 2014 19:21:41 +0000 (20:21 +0100)]
lvcreate: Implement --cachepolicy/--cachesettings.

9 years agometadata: Add cache_policy to lvcreate_params and honour it.
Petr Rockai [Thu, 27 Nov 2014 19:20:48 +0000 (20:20 +0100)]
metadata: Add cache_policy to lvcreate_params and honour it.

9 years agotoollib: Fix uninitialised config value type in get_cachepolicy_params.
Petr Rockai [Thu, 27 Nov 2014 19:19:28 +0000 (20:19 +0100)]
toollib: Fix uninitialised config value type in get_cachepolicy_params.

9 years agotoollib: fix regression in parsing /dev/mapper/vg-lv
Zdenek Kabelac [Wed, 26 Nov 2014 16:09:47 +0000 (17:09 +0100)]
toollib: fix regression in parsing /dev/mapper/vg-lv

Commit b0dde9e8f026ddd679 introduced regression in parsing
/dev/mapper prefix - and tried to check for '/' one char behind.

9 years agocoverity: remove dead code in lv_info_with_seg_status (continued)
Peter Rajnoha [Wed, 26 Nov 2014 10:58:25 +0000 (11:58 +0100)]
coverity: remove dead code in lv_info_with_seg_status (continued)

9 years agocoverity: fix possible NULL dereference
Peter Rajnoha [Wed, 26 Nov 2014 10:46:13 +0000 (11:46 +0100)]
coverity: fix possible NULL dereference

The call to dm_config_destroy can derefence result->mem
while result is still NULL:

struct dm_config_tree *get_cachepolicy_params(struct cmd_context *cmd)
{
...
int ok = 0;
...
if (!(result = dm_config_flatten(current)))
goto_out;
...
ok = 1;
out:
 if (!ok) {
dm_config_destroy(result)
...
}
...
}

9 years agocoverity: remove dead code in lv_info_with_seg_status
Peter Rajnoha [Wed, 26 Nov 2014 10:30:01 +0000 (11:30 +0100)]
coverity: remove dead code in lv_info_with_seg_status

Just call return 0 directly on error path, without using
"goto" - the code is short, no need to use it this way
(the dead code appeared as part of further changes in this
function).

9 years agomakefiles: avoid regeneration of Makefile
Zdenek Kabelac [Tue, 25 Nov 2014 22:01:28 +0000 (23:01 +0100)]
makefiles: avoid regeneration of Makefile

When Makefile.in is touched, it's been matched by 'man' rule
and it's been wrongly regnerated.

Put in explicit rules to avoid Makefile sed processing.

9 years agothin: add missing 64KB rounding
Zdenek Kabelac [Wed, 26 Nov 2014 08:27:40 +0000 (09:27 +0100)]
thin: add missing 64KB rounding

When chunk size needs to be estimated, the code missed to round
to proper 64kb boundaries  (or power of 2 for older thin pool driver).
So for some data and metadata size (i.e. 10GB and 4MB) it resulted
in incorrect chunk size (not being a multiple of 64KB)

Fix it by adding proper rounding and also use 1 routine for 2 places
where the same calculation is made.

Fix also incorrect printed warning that has used 'ffs()'
(which returns first 'least significant' bit in word)
and it was not really giving any useful size info and replace it
with properly estimated chunk size.

9 years agoinitscripts: fix typo in clvmd initscript causing CLVMD_STOP_TIMEOUT variable to...
Peter Rajnoha [Tue, 25 Nov 2014 14:18:58 +0000 (15:18 +0100)]
initscripts: fix typo in clvmd initscript causing CLVMD_STOP_TIMEOUT variable to be ignored

9 years agopvresize: fix size in 'Resizing to ...' verbose message to show proper result size
Peter Rajnoha [Tue, 25 Nov 2014 14:16:09 +0000 (15:16 +0100)]
pvresize: fix size in 'Resizing to ...' verbose message to show proper result size

9 years agopost-release
Alasdair G Kergon [Mon, 24 Nov 2014 17:48:25 +0000 (17:48 +0000)]
post-release

9 years agopre-release v2_02_113
Alasdair G Kergon [Mon, 24 Nov 2014 17:46:50 +0000 (17:46 +0000)]
pre-release

9 years agocache: comment out unsupported pooldatasize
Zdenek Kabelac [Mon, 24 Nov 2014 16:38:39 +0000 (17:38 +0100)]
cache: comment out unsupported pooldatasize

Support for pooldatasize is not yet finished, so keep it commented out
for now.

9 years agoman: update
Zdenek Kabelac [Mon, 24 Nov 2014 13:48:13 +0000 (14:48 +0100)]
man: update

Improve lvconvert.
Put ENV section downward in lvm.8.

9 years agotests: use proper LVMTEST prefix for VG name
Zdenek Kabelac [Sun, 23 Nov 2014 23:44:43 +0000 (00:44 +0100)]
tests: use proper LVMTEST prefix for VG name

Cleaner needs prefix to do its jobs and clean any left VG from python
test as well.

9 years agolvconvert: earlier detection of conflicting names
Zdenek Kabelac [Sun, 23 Nov 2014 23:35:27 +0000 (00:35 +0100)]
lvconvert: earlier detection of conflicting names

Detect same LV names for lvconvert prior opening VG.
i.e. lvconvert --thinpool vg/lvol0  -T lvol0

9 years agoman: fix pages for generators
Zdenek Kabelac [Sun, 23 Nov 2014 23:32:26 +0000 (00:32 +0100)]
man: fix pages for generators

Properly generate man page for systemd generators on make.
Simplified  install_clusters

9 years agolibdm: there is no element in item 0
Zdenek Kabelac [Mon, 24 Nov 2014 13:37:11 +0000 (14:37 +0100)]
libdm: there is no element in item 0

Items[0] holds only counter in .len.
So don't zero already zeroed items[0].len assigned above.

(finishing fc935495c813b7577ac8237459a2cc65ea291ac2)

9 years agoreport: add some comments about how string list is stored internally
Peter Rajnoha [Mon, 24 Nov 2014 12:14:33 +0000 (13:14 +0100)]
report: add some comments about how string list is stored internally

9 years agoreport: add some comments about how string list is stored internally
Peter Rajnoha [Mon, 24 Nov 2014 09:48:01 +0000 (10:48 +0100)]
report: add some comments about how string list is stored internally

9 years agoman/lvchange: Mention --cachepolicy and --cachesettings.
Petr Rockai [Sun, 23 Nov 2014 22:42:20 +0000 (23:42 +0100)]
man/lvchange: Mention --cachepolicy and --cachesettings.

9 years agoman/lvm.conf: Update to reflect changes in config parser.
Petr Rockai [Sun, 23 Nov 2014 22:41:58 +0000 (23:41 +0100)]
man/lvm.conf: Update to reflect changes in config parser.

9 years agoUpdate WHATS_NEW.
Petr Rockai [Sun, 23 Nov 2014 22:30:27 +0000 (23:30 +0100)]
Update WHATS_NEW.

9 years agocleanup: add missing error path check
Zdenek Kabelac [Sat, 22 Nov 2014 21:39:56 +0000 (22:39 +0100)]
cleanup: add missing error path check

New code misses error path check.

9 years agocleanup: warning: declaration of 'remove' shadows a global declaration
Zdenek Kabelac [Sat, 22 Nov 2014 19:14:42 +0000 (20:14 +0100)]
cleanup: warning: declaration of 'remove' shadows a  global declaration

Don't shadow stdio.h declaration.

9 years agolibdm: report fix memleak on error path
Zdenek Kabelac [Sat, 22 Nov 2014 21:40:40 +0000 (22:40 +0100)]
libdm: report fix memleak on error path

When _alloc_selection_node() fails, rh should be destroyed.

Use 'bad:' label since we have goto_bad with stack embeded.

9 years agopool: prevent pool conversion with same name
Zdenek Kabelac [Sat, 22 Nov 2014 22:37:31 +0000 (23:37 +0100)]
pool: prevent pool conversion with same name

When same name is given for converted volume and pool volume,
stop further command processing.

9 years agotests: reduce thin test
Zdenek Kabelac [Sat, 22 Nov 2014 17:15:52 +0000 (18:15 +0100)]
tests: reduce thin test

9 years agotests: use old virt snaps in the test
Zdenek Kabelac [Sat, 22 Nov 2014 17:14:45 +0000 (18:14 +0100)]
tests: use old virt snaps in the test

Don't use thin with its thin requirements for the test.

9 years agolibdm: fix reporting of empty string list
Zdenek Kabelac [Sat, 22 Nov 2014 17:13:21 +0000 (18:13 +0100)]
libdm: fix reporting of empty string list

Don't write behind the allocated array when list is empty.
Use index 0 for the allocated element.

Error triggered by i.e.:  lvs -a -o all,lv_modules

9 years agomakefiles: standard usage of make.tmpl
Zdenek Kabelac [Fri, 21 Nov 2014 15:34:01 +0000 (16:34 +0100)]
makefiles: standard usage of make.tmpl

Use lvm2 standard TARGETS.

Make liblvm_python.c as intermediate target (gets deleted after use)

Properly delete build dir on make distclean.

Mark install_python_bindings as .PHONY.

9 years agodev_manager: fix mknodes
Zdenek Kabelac [Fri, 21 Nov 2014 18:36:51 +0000 (19:36 +0100)]
dev_manager: fix mknodes

Fix regression introduced with a2c1024f6ac7e22ac5c010a267d0c1df331ee416

_setup_task(mknodes ? name : NULL...

has been replaced with:

_setup_task(type != MKNODES ? name : NULL....

Use '=='

9 years agoconfigure: fix CLVMD_PATH location
Zdenek Kabelac [Fri, 21 Nov 2014 15:33:48 +0000 (16:33 +0100)]
configure: fix CLVMD_PATH location

Commit d2c116058e72d365802eb5641be60a615daacb96 introduced regression
with CLVMD_PATH.

+        CLVMD_PATH="$clvmd_prefix/sbin/clvmd"
         test "$prefix" != NONE && clvmd_prefix=$prefix

It has set CLVMD_PATH before clvmd_prefix got its final value.
Move it one line below.

9 years agocleanup: drop unused vars
Zdenek Kabelac [Thu, 20 Nov 2014 16:49:32 +0000 (17:49 +0100)]
cleanup: drop unused vars

9 years agotest: Also test repeated --cachesettings in lvchange-cache.
Petr Rockai [Thu, 20 Nov 2014 11:35:51 +0000 (12:35 +0100)]
test: Also test repeated --cachesettings in lvchange-cache.

9 years agocache: Implement 'default' as a policy settings value to clear the record.
Petr Rockai [Thu, 20 Nov 2014 11:05:40 +0000 (12:05 +0100)]
cache: Implement 'default' as a policy settings value to clear the record.

9 years agotoollib: Split --cachesettings from --cachepolicy.
Petr Rockai [Thu, 20 Nov 2014 10:30:19 +0000 (11:30 +0100)]
toollib: Split --cachesettings from --cachepolicy.

9 years agotest: Add a test for lvchange --cachepolicy.
Petr Rockai [Wed, 19 Nov 2014 17:49:15 +0000 (18:49 +0100)]
test: Add a test for lvchange --cachepolicy.

9 years agolvchange: Accept --cachepolicy.
Petr Rockai [Wed, 19 Nov 2014 17:39:58 +0000 (18:39 +0100)]
lvchange: Accept --cachepolicy.

9 years agotoollib: Add --cachepolicy and implement get_cachepolicy_params.
Petr Rockai [Wed, 19 Nov 2014 17:39:29 +0000 (18:39 +0100)]
toollib: Add --cachepolicy and implement get_cachepolicy_params.

9 years agocache: Add lv_cache_setpolicy to cache_manip.c.
Petr Rockai [Wed, 19 Nov 2014 17:38:30 +0000 (18:38 +0100)]
cache: Add lv_cache_setpolicy to cache_manip.c.

9 years agolibdm-config: Warn about duplicate keys.
Petr Rockai [Thu, 20 Nov 2014 15:18:22 +0000 (16:18 +0100)]
libdm-config: Warn about duplicate keys.

9 years agolibdm-config: Implement dm_config_remove_node.
Petr Rockai [Thu, 20 Nov 2014 11:05:09 +0000 (12:05 +0100)]
libdm-config: Implement dm_config_remove_node.

9 years agolibdm-config: Interpret barewords after '=' as strings.
Petr Rockai [Wed, 19 Nov 2014 17:48:47 +0000 (18:48 +0100)]
libdm-config: Interpret barewords after '=' as strings.

9 years agolibdm-config: Implement dm_config_flatten.
Petr Rockai [Wed, 19 Nov 2014 17:37:31 +0000 (18:37 +0100)]
libdm-config: Implement dm_config_flatten.

9 years agolibdm-config: Re-link config trees to reflect file order of keys/sections.
Petr Rockai [Tue, 18 Nov 2014 22:39:11 +0000 (23:39 +0100)]
libdm-config: Re-link config trees to reflect file order of keys/sections.

9 years agolibdm-config: Allow paths (section/key = value) in config files.
Petr Rockai [Mon, 10 Nov 2014 06:38:19 +0000 (07:38 +0100)]
libdm-config: Allow paths (section/key = value) in config files.

The order of the resulting tree is based on the first appearance of
sections. With no section repeats, the sections stay as listed in the
config file. Sections using the brace syntax 'section { key = value }' are
treated the same way: 'section { x = 1 } section { y = 2 }' is the same as
'section/x = 1 section/y = 2' is the same as 'section { x = 1 y = 2 }'

9 years agocache: check for internal error
Zdenek Kabelac [Thu, 20 Nov 2014 15:35:46 +0000 (16:35 +0100)]
cache: check for internal error

Don't try to duplicate NULL on internal error path.

9 years agotoollib: release vg on ignore path
Zdenek Kabelac [Thu, 20 Nov 2014 07:52:44 +0000 (08:52 +0100)]
toollib: release vg on ignore path

Missing call to release_vg().

9 years agorevert: 7639eae and 4a52a92
Peter Rajnoha [Thu, 20 Nov 2014 07:22:34 +0000 (08:22 +0100)]
revert: 7639eae and 4a52a92

Revert 7639eae8919e5872143562db8118d039f5a41225 and
4a52a9212cc5d3ae90196776f28dbfb319002c74. We need a better fix here.

9 years agotests: use snapshot targets
Zdenek Kabelac [Wed, 19 Nov 2014 22:24:18 +0000 (23:24 +0100)]
tests: use snapshot targets

9 years agotests: prepare control node before clvmd
Zdenek Kabelac [Wed, 19 Nov 2014 22:22:52 +0000 (23:22 +0100)]
tests: prepare control node before clvmd

Make sure there is 'control' node before clvmd is started.
Somehow  'clvmd' is not allowed by selinux to create one.

TODO: Check is selinux policy is right here...

9 years agothin: fix error path
Zdenek Kabelac [Wed, 19 Nov 2014 17:57:40 +0000 (18:57 +0100)]
thin: fix error path

Print pool name and not the origin name.

9 years agosystemd: clvmd and cmirrord systemd unit - use usrsbindir instead of sbindir
Peter Rajnoha [Wed, 19 Nov 2014 15:03:11 +0000 (16:03 +0100)]
systemd: clvmd and cmirrord systemd unit - use usrsbindir instead of sbindir

9 years agoconfigure: expand prefix and exec_prefix directly in configure
Peter Rajnoha [Wed, 19 Nov 2014 15:02:41 +0000 (16:02 +0100)]
configure: expand prefix and exec_prefix directly in configure

In case someone wants to use @some_path@ that contains
prefix or exec_prefix and it's used in other files than Makefiles
(Makefiles used make.tmpl to expand these).

9 years agoconfigure: make configure --enable-udev-systemd-background-jobs only for systemd...
Peter Rajnoha [Wed, 19 Nov 2014 12:47:09 +0000 (13:47 +0100)]
configure: make configure --enable-udev-systemd-background-jobs only for systemd >= 205

systemd-run is available in systemd>=205. Also, this fix prevents
systemd-specific udev rules in 69-dm-lvm-metad.rules to appear in
case systemd environment is not available - make configure to check
this automatically and use these systemd specific rules only if it
is applicable.

9 years agoman: clvmd updates
Zdenek Kabelac [Wed, 19 Nov 2014 00:04:24 +0000 (01:04 +0100)]
man: clvmd updates

- closer to the recommendation of man-pages (7) if possible
- Add crossrefs
- Sort options and crossrefs
- Fix default timeout (60 secs) of -t
- Documents -I[auto]

Signed-off-by: Stéphane Aulery <saulery@free.fr>
9 years agoman: clvmd help output
Zdenek Kabelac [Tue, 18 Nov 2014 21:07:58 +0000 (22:07 +0100)]
man: clvmd help output

Closer to the recommendation of groff_man (7) if possible

Signed-off-by: Stéphane Aulery <saulery@free.fr>
9 years agoman: blkdeactivate help output
Zdenek Kabelac [Tue, 18 Nov 2014 23:35:04 +0000 (00:35 +0100)]
man: blkdeactivate help output

- Closer to the recommendation of man-pages and groff_man (7) if
  possible
- Sort options and crossrefs
- Relocate sub-options on the right places

Signed-off-by: Stéphane Aulery <saulery@free.fr>
9 years agoman: lvchange update
Zdenek Kabelac [Tue, 18 Nov 2014 23:30:43 +0000 (00:30 +0100)]
man: lvchange update

Fix \fI usage.

9 years agocleanup: drop unused var
Zdenek Kabelac [Tue, 18 Nov 2014 14:52:46 +0000 (15:52 +0100)]
cleanup: drop unused var

9 years agolocking: rename LCK_CONVERT
Zdenek Kabelac [Tue, 18 Nov 2014 08:04:30 +0000 (09:04 +0100)]
locking: rename LCK_CONVERT

All 'MODE' bits are using _MODE suffix so rename to LCK_CONVERT_MODE
(part of rhbz 735445).
No functional change.

9 years agotoollib: improve ignore_vg case in _process_pvs_in_vgs
David Teigland [Tue, 18 Nov 2014 15:22:37 +0000 (09:22 -0600)]
toollib: improve ignore_vg case in _process_pvs_in_vgs

ignore_vg now returns 0 for the FAILED_CLUSTERED case,
so all the ignore_vg 1 cases will return vg's with an
empty vg->pvs, so we do not need to iterate through
vg->pvs to remove the entries from the devices list.

Clean up whitespace problems in that area from the
previous commit.

9 years agomemlock: Make malloc reserve more robust against glibc tricks.
Petr Rockai [Tue, 30 Sep 2014 08:56:59 +0000 (10:56 +0200)]
memlock: Make malloc reserve more robust against glibc tricks.

9 years agotests: deactivate repaired before swap
Zdenek Kabelac [Mon, 17 Nov 2014 07:44:53 +0000 (08:44 +0100)]
tests: deactivate repaired before swap

9 years agotests: thin repair testing
Zdenek Kabelac [Sun, 16 Nov 2014 23:41:33 +0000 (00:41 +0100)]
tests: thin repair testing

More checks for thin related tools.
Add same functionality for cache related tools.

9 years agotests: reduce number of sync waiting
Zdenek Kabelac [Sun, 16 Nov 2014 23:34:44 +0000 (00:34 +0100)]
tests: reduce number of sync waiting

Lets assume faster systems, if we have too big raid arrays,
reduce them.

9 years agotests: skip another older kernel from raid456
Zdenek Kabelac [Sun, 16 Nov 2014 23:32:49 +0000 (00:32 +0100)]
tests: skip another older kernel from raid456

9 years agotoollib: fixes and cleanup of recent changes
David Teigland [Fri, 14 Nov 2014 21:00:35 +0000 (15:00 -0600)]
toollib: fixes and cleanup of recent changes

- Fix problems with recent changes related to skipping in:
  . _process_vgnameid_list
  . _process_pvs_in_vgs

- Undo unnecessary changes to the code structure and readability.

- Preserve valid but minor changes:
  . testing FAILED bit values in ignore_vg
  . using "skip" value from ignore_vg instead of "ret" value
  . applying the sigint check to the start of all loops
  . setting stack backtrace when ECMD_PROCESSED is not returned,
    i.e. apply the following pattern:

ret = process_foo();
if (ret != ECMD_PROCESSED)
stack;
if (ret > ret_max)
ret_max = ret;

9 years agotoollib: ignore_vg() with skip is not locked
Zdenek Kabelac [Fri, 14 Nov 2014 18:32:03 +0000 (19:32 +0100)]
toollib: ignore_vg() with skip is not locked

Extend/fix d8923457b82456ebee3e333b3fcc26087483cd01 commit.

'skip'-ed VG is not holding any lock - so don't unlock such VG.

At the same time simplify the code around and relase VG at a single
place and unlock only not skiped and not ignored VGs.

9 years agotests: explicit raid sync
Zdenek Kabelac [Thu, 13 Nov 2014 20:52:02 +0000 (21:52 +0100)]
tests: explicit raid sync

9 years agodebug: switch to verbose
Zdenek Kabelac [Fri, 14 Nov 2014 15:11:43 +0000 (16:11 +0100)]
debug: switch to verbose

When there is no real error from the function - avoid using log_error().

9 years agodebug: better message for pool zeroing state
Zdenek Kabelac [Fri, 14 Nov 2014 15:11:16 +0000 (16:11 +0100)]
debug: better message for pool zeroing state

9 years agocleanup: add '.' to log messages
Zdenek Kabelac [Fri, 14 Nov 2014 15:08:27 +0000 (16:08 +0100)]
cleanup: add '.' to log messages

9 years agovg_read: correct warning
Zdenek Kabelac [Fri, 14 Nov 2014 13:58:20 +0000 (14:58 +0100)]
vg_read: correct warning

Use log_warn when we are effectively not creating an error -
we 'allowed' inconsistent read for a reason - so it's just warning
level we process inconsistent VG - it's upto caller later to decide
error level of command return value and in case of error it needs
to use log_error then.

9 years agotoolib: fix ignore_vg
Zdenek Kabelac [Fri, 14 Nov 2014 09:50:31 +0000 (10:50 +0100)]
toolib: fix ignore_vg

Rework ignore_vg() API so it properly handles
multiple kind of vg_read_error() states.

Skip processing only otherwise valid VG.

Always return ECMD_FAILED when break is detected.

Check sigint_caught() in front of dm iterator loop.

Add stack for _process failing ret codes.

9 years agovg_read: use new error flag
Zdenek Kabelac [Fri, 14 Nov 2014 13:55:57 +0000 (14:55 +0100)]
vg_read: use new error flag

Failed recovery provides different (NULL) VG then FAILED_INCONSISTENT.
Mark it with different failure bit - since FAILED_INCONSISTENT is
supposed to contain something 'usable' (thought inconsistent).

9 years agolvmcache: remove unnecessary line break syntax
David Teigland [Thu, 13 Nov 2014 17:07:34 +0000 (11:07 -0600)]
lvmcache: remove unnecessary line break syntax

9 years agolvmcache.7: remove unwanted line continuation syntax
David Teigland [Thu, 13 Nov 2014 17:04:15 +0000 (11:04 -0600)]
lvmcache.7: remove unwanted line continuation syntax

9 years agolvconvert.8: fix bold and italic syntax mistake
Stéphane Aulery [Wed, 12 Nov 2014 12:39:36 +0000 (13:39 +0100)]
lvconvert.8: fix bold and italic syntax mistake

Signed-off-by: Stéphane Aulery <saulery@free.fr>
9 years agocleanup: remove unused headers
Zdenek Kabelac [Thu, 13 Nov 2014 13:36:20 +0000 (14:36 +0100)]
cleanup: remove unused headers

9 years agocleanup: validate pointers
Zdenek Kabelac [Thu, 13 Nov 2014 16:40:30 +0000 (17:40 +0100)]
cleanup: validate pointers

Mostly on almost impossible to happen paths - but stay safe.

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