]> sourceware.org Git - lvm2.git/log
lvm2.git
7 years agolvchange: persistent major/minor processing regression
Heinz Mauelshagen [Fri, 31 Mar 2017 15:09:33 +0000 (17:09 +0200)]
lvchange: persistent major/minor processing regression

Optimized change.

Resolves: rhbz1437611

7 years agolvchange: persistent major/minor processing regression
Heinz Mauelshagen [Fri, 31 Mar 2017 11:51:39 +0000 (13:51 +0200)]
lvchange: persistent major/minor processing regression

Fix a regression introduced by new command line processing
(see starting commit 1e2420bca85da9a37570871cd70192e9ae831786)
causing activation to be rejected in combination with setting
persistent minor device numbers.

Resolves: rhbz1437611

7 years agoman: pregen file change
Heinz Mauelshagen [Thu, 30 Mar 2017 18:48:53 +0000 (20:48 +0200)]
man: pregen file change

7 years agoman-generator: shutdown stdout buffer
Heinz Mauelshagen [Thu, 30 Mar 2017 18:40:44 +0000 (20:40 +0200)]
man-generator: shutdown stdout buffer

Flush stdout and switch it back to line buffering before exit.

7 years agoman-generator: enhance performance
Heinz Mauelshagen [Thu, 30 Mar 2017 17:55:50 +0000 (19:55 +0200)]
man-generator: enhance performance

Set block buffering on stdout to
save ~30% time generating manuals.

7 years agoman-generator: don't ignore description file errors
Heinz Mauelshagen [Thu, 30 Mar 2017 17:51:35 +0000 (19:51 +0200)]
man-generator: don't ignore description file errors

In case we provide a description file it has to
succeed opening and reading.  Dynamically allocate
buffer space for it whilst on it.

7 years agoraid: more coverity issues
Heinz Mauelshagen [Thu, 30 Mar 2017 16:39:04 +0000 (18:39 +0200)]
raid: more coverity issues

7 years agoraid: favour dm_list_first()
Heinz Mauelshagen [Thu, 30 Mar 2017 16:13:27 +0000 (18:13 +0200)]
raid: favour dm_list_first()

7 years agoraid: address coverity issues
Heinz Mauelshagen [Thu, 30 Mar 2017 16:09:06 +0000 (18:09 +0200)]
raid: address coverity issues

7 years agoman-generator: add '.' to all messages
Heinz Mauelshagen [Thu, 30 Mar 2017 15:54:36 +0000 (17:54 +0200)]
man-generator: add '.' to all messages

7 years agoman: add minor regexp
Heinz Mauelshagen [Thu, 30 Mar 2017 15:54:02 +0000 (17:54 +0200)]
man: add minor regexp

7 years agodmsetup: replace (f)printf("\n") with putchar/putc
Bryn M. Reeves [Thu, 30 Mar 2017 15:30:50 +0000 (16:30 +0100)]
dmsetup: replace (f)printf("\n") with putchar/putc

7 years agolibdm: use correct FMTu32 format specifier for uint32_t
Bryn M. Reeves [Thu, 30 Mar 2017 15:17:19 +0000 (16:17 +0100)]
libdm: use correct FMTu32 format specifier for uint32_t

7 years agolibdm: fix incorrect format specifier in _stats_resize_group()
Bryn M. Reeves [Thu, 30 Mar 2017 09:31:36 +0000 (10:31 +0100)]
libdm: fix incorrect format specifier in _stats_resize_group()

The bitmap size in dm_bitset_t[0] is a uint32_t, not uint64_t: use
%u instead of FMTu64.

7 years agodmsetup: Flush ouptut when using --interval
Nir Soffer [Thu, 30 Mar 2017 09:17:32 +0000 (10:17 +0100)]
dmsetup: Flush ouptut when using --interval

7 years agolibdm: use uint64_t where possible in filemap routines
Bryn M. Reeves [Wed, 29 Mar 2017 19:49:03 +0000 (20:49 +0100)]
libdm: use uint64_t where possible in filemap routines

Use uint64_t where possible and explicit casts elsewhere to avoid
compiler warnings when converting between int, int64_t and
uint64_t.

7 years agolibdm: use size_t for buflen in _stats_group_file_regions()
Bryn M. Reeves [Wed, 29 Mar 2017 19:46:21 +0000 (20:46 +0100)]
libdm: use size_t for buflen in _stats_group_file_regions()

7 years agolibdm: make _stats_resize_group() num_regions argument uint64_t
Bryn M. Reeves [Wed, 29 Mar 2017 19:42:36 +0000 (20:42 +0100)]
libdm: make _stats_resize_group() num_regions argument uint64_t

7 years agolibdm: make _find_extent() nr_extents argument uint64_t
Bryn M. Reeves [Wed, 29 Mar 2017 19:41:33 +0000 (20:41 +0100)]
libdm: make _find_extent() nr_extents argument uint64_t

7 years agodmfilemapd: cast return value of strto* functions when needed
Bryn M. Reeves [Wed, 29 Mar 2017 19:32:55 +0000 (20:32 +0100)]
dmfilemapd: cast return value of strto* functions when needed

7 years agodmfilemapd: use log_sys_error in _filemap_monitor_set_notify
Bryn M. Reeves [Wed, 29 Mar 2017 19:29:20 +0000 (20:29 +0100)]
dmfilemapd: use log_sys_error in _filemap_monitor_set_notify

Since _filemap_monitor_set_notify() is only called after daemon
start up it should not use the _early_log() macros. Instead, use
log_sys_error to log errors from the two syscalls in the function.

7 years agodmfilemapd: cast sysconf() return value to int
Bryn M. Reeves [Wed, 29 Mar 2017 19:28:43 +0000 (20:28 +0100)]
dmfilemapd: cast sysconf() return value to int

7 years agodmfilemapd: fix len type in _filemap_monitor_check_file_unlinked()
Bryn M. Reeves [Wed, 29 Mar 2017 19:26:39 +0000 (20:26 +0100)]
dmfilemapd: fix len type in _filemap_monitor_check_file_unlinked()

Make 'len' a size_t to match the return type of readlink(2).

7 years agodmfilemapd: make filemap_monitor->nr_regions uint64_t
Bryn M. Reeves [Wed, 29 Mar 2017 19:23:57 +0000 (20:23 +0100)]
dmfilemapd: make filemap_monitor->nr_regions uint64_t

7 years agolibdm: use DM_STATS_GROUP_* constants in dm_stats_create_regions_from_fd
Bryn M. Reeves [Wed, 29 Mar 2017 19:02:26 +0000 (20:02 +0100)]
libdm: use DM_STATS_GROUP_* constants in dm_stats_create_regions_from_fd

7 years agodmsetup: simplify branching in _stats_update_file()
Bryn M. Reeves [Wed, 29 Mar 2017 17:30:16 +0000 (18:30 +0100)]
dmsetup: simplify branching in _stats_update_file()

The fallback branch in _stats_update_file() is redundant (since the
branch taken when the daemon starts successfully must jump to the
'out' label anyway): remove it and re-order the conditions to
improve readability.

7 years agoman: raid cleanup
Heinz Mauelshagen [Wed, 29 Mar 2017 22:44:04 +0000 (00:44 +0200)]
man: raid cleanup

7 years agoman: Copyright
Heinz Mauelshagen [Wed, 29 Mar 2017 22:42:44 +0000 (00:42 +0200)]
man: Copyright

7 years agoman: use variable in Makefile / regexp
Heinz Mauelshagen [Wed, 29 Mar 2017 22:41:24 +0000 (00:41 +0200)]
man: use variable in Makefile / regexp

7 years agoman-generator: catch missing command name
Heinz Mauelshagen [Wed, 29 Mar 2017 22:39:26 +0000 (00:39 +0200)]
man-generator: catch missing command name

7 years agotests: fix typo in makefile
Zdenek Kabelac [Wed, 29 Mar 2017 22:19:02 +0000 (00:19 +0200)]
tests: fix typo in makefile

Use properly $(SORT)

7 years agoman: fix type
Zdenek Kabelac [Wed, 29 Mar 2017 22:35:46 +0000 (00:35 +0200)]
man: fix type

With commit 4af09a94bd44693e5a40a4f895599601d8233d69 unwanted rename  of
target happened - restore it.

7 years agovgrename: use long enough buffer for path
Zdenek Kabelac [Wed, 29 Mar 2017 22:17:37 +0000 (00:17 +0200)]
vgrename: use long enough buffer for path

Use PATH_MAX when creating buffers for rename.

7 years agolibdm: use log_sys_error if dmfilemapd exec fails
Bryn M. Reeves [Wed, 29 Mar 2017 20:27:11 +0000 (21:27 +0100)]
libdm: use log_sys_error if dmfilemapd exec fails

Use log_sys_error rather than log_error if execvp() fails:

  /mnt/redhat/xdoio.13752.XIORQ: Created new group with 2 region(s) as group ID 0.
  # execvp() failed.

vs:

  /var/lib/libvirt/images/rhel7-vm1.qcow2: Created new group with 884 region(s) as group ID 0.
  dmfilemapd: execvp failed: No such file or directory

7 years agodmsetup: always close fd when leaving _stats_update_file() (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 17:27:11 +0000 (18:27 +0100)]
dmsetup: always close fd when leaving _stats_update_file() (coverity)

7 years agodmsetup: do not start dmfilemapd if region creation fails (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 17:21:17 +0000 (18:21 +0100)]
dmsetup: do not start dmfilemapd if region creation fails (coverity)

7 years agolibdm: do not attempt filemap cleanup if dm_stats_list() fails (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:41:03 +0000 (17:41 +0100)]
libdm: do not attempt filemap cleanup if dm_stats_list() fails (coverity)

7 years agolibdm: abort filemap update if pool allocation fails (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:39:31 +0000 (17:39 +0100)]
libdm: abort filemap update if pool allocation fails (coverity)

7 years agolibdm: do not leak FIEMAP extent buffer if pool allocation fails (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:37:10 +0000 (17:37 +0100)]
libdm: do not leak FIEMAP extent buffer if pool allocation fails (coverity)

7 years agodmfilemapd: free region table at end of _update_regions() (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:33:23 +0000 (17:33 +0100)]
dmfilemapd: free region table at end of _update_regions() (coverity)

7 years agodmfilemapd: fix off-by-one in fd comparison (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:25:20 +0000 (17:25 +0100)]
dmfilemapd: fix off-by-one in fd comparison (coverity)

The function _filemap_monitor_check_file_unlinked() attempts to
test whether a fd value should be closed by comparison to zero:

        if ((fd > 0) && close(fd))
                log_error("Error closing fd %d", fd);

The test should be '>=' since 0 is a valid file descriptor.

7 years agodmfilemapd: always close link check file descriptor (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:22:18 +0000 (17:22 +0100)]
dmfilemapd: always close link check file descriptor (coverity)

Similar to 40fb91a, but for the file descriptor opened using the
link path reported by /proc/<self>/fd/<fd>.

The daemon opens a new file descriptor from /proc/<self>/fd when
checking for an unlinked file with mode=inode. Ensure that it is
always closed even if the same file test fails.

7 years agodmfilemapd: always terminate link buffer after readlink(2) (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:16:34 +0000 (17:16 +0100)]
dmfilemapd: always terminate link buffer after readlink(2) (coverity)

7 years agodmfilemapd: always close check file descriptor (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:04:55 +0000 (17:04 +0100)]
dmfilemapd: always close check file descriptor (coverity)

The daemon opens a new file descriptor from fm->path when checking
for an unlinked file with mode=inode. Ensure that it is always
closed even if the same file test fails.

7 years agodmfilemapd: use *argv[0] when testing for absolute path (coverity)
Bryn M. Reeves [Wed, 29 Mar 2017 16:03:20 +0000 (17:03 +0100)]
dmfilemapd: use *argv[0] when testing for absolute path (coverity)

The path argument check in dmfilemapd incorrectly tests for:

  if (argv[0] == '/')

Rather than testing the 1st character in the string pointed to by
argv[0].

7 years agodmfilemapd: pass correct dirp to closedir()
Bryn M. Reeves [Wed, 29 Mar 2017 15:54:44 +0000 (16:54 +0100)]
dmfilemapd: pass correct dirp to closedir()

7 years agodmfilemapd: do not closdir(pid_d) unless it is open
Bryn M. Reeves [Wed, 29 Mar 2017 15:48:32 +0000 (16:48 +0100)]
dmfilemapd: do not closdir(pid_d) unless it is open

7 years agodmfilemapd: log closedir errors with log_sys_error()
Bryn M. Reeves [Wed, 29 Mar 2017 15:04:15 +0000 (16:04 +0100)]
dmfilemapd: log closedir errors with log_sys_error()

7 years agodmstats: Fix path to static dmstats
Marian Csontos [Wed, 29 Mar 2017 07:03:57 +0000 (09:03 +0200)]
dmstats: Fix path to static dmstats

7 years agoman: ranges/LV names/symbolic use regexp
Heinz Mauelshagen [Wed, 29 Mar 2017 00:27:10 +0000 (02:27 +0200)]
man: ranges/LV names/symbolic use regexp

7 years agoman: simplify by avoiding different headers on de-duplication of lvmconfig, lvm-confi...
Heinz Mauelshagen [Tue, 28 Mar 2017 23:44:09 +0000 (01:44 +0200)]
man: simplify by avoiding different headers on de-duplication of lvmconfig, lvm-config and lvm-dumpconfig

7 years agoman: de-duplicate lvmconfig, lvm-config and lvm-dumpconfig manuals
Heinz Mauelshagen [Tue, 28 Mar 2017 22:22:15 +0000 (00:22 +0200)]
man: de-duplicate lvmconfig, lvm-config and lvm-dumpconfig manuals

7 years agospec: Add dmfilemapd
Marian Csontos [Tue, 28 Mar 2017 19:35:46 +0000 (21:35 +0200)]
spec: Add dmfilemapd

7 years agodmfilemapd: Fix install target
Marian Csontos [Tue, 28 Mar 2017 19:27:30 +0000 (21:27 +0200)]
dmfilemapd: Fix install target

7 years agoman: regexp readability / use $(SED)
Heinz Mauelshagen [Tue, 28 Mar 2017 15:51:22 +0000 (17:51 +0200)]
man: regexp readability / use $(SED)

7 years agopost-release
Alasdair G Kergon [Tue, 28 Mar 2017 15:14:03 +0000 (16:14 +0100)]
post-release

7 years agopre-release v2_02_169
Alasdair G Kergon [Tue, 28 Mar 2017 14:28:53 +0000 (15:28 +0100)]
pre-release

Removing some unused new lines and changing some incorrect "can't
release until this is fixed" comments.  Rename license.txt to make
it clear its merely an included file, not itself a licence.

7 years agoman: pre-generated files weren't committed
Alasdair G Kergon [Tue, 28 Mar 2017 00:32:59 +0000 (01:32 +0100)]
man: pre-generated files weren't committed

7 years agoman: fix / typo
Heinz Mauelshagen [Mon, 27 Mar 2017 22:27:04 +0000 (00:27 +0200)]
man: fix / typo

7 years agoman: enhance man postprocessing regexp
Heinz Mauelshagen [Mon, 27 Mar 2017 22:17:43 +0000 (00:17 +0200)]
man: enhance man postprocessing regexp

7 years agotests: update to better fit
Zdenek Kabelac [Thu, 23 Mar 2017 15:00:02 +0000 (16:00 +0100)]
tests: update to better fit

Die is automatic on 'error' result
Cleanup everything on 'regular' code path.

7 years agocleanup: use more common FMTd64 type
Zdenek Kabelac [Mon, 27 Mar 2017 18:32:21 +0000 (20:32 +0200)]
cleanup: use more common FMTd64 type

We use 'd' for plain singed integers.

7 years agobuild: fix x32 arch
Mikulas Patocka [Wed, 15 Feb 2017 16:01:49 +0000 (11:01 -0500)]
build: fix x32 arch

This patch fixed lvm2 compilation running on x32 arch.
(Using 64bit x86 cpu features but running on 32b address space,
so consuming less mem in VM).

On x32 arch 'time_t' is 64bit while 'long' is 32bit.

7 years agoman-generator/man/help: simplify hyphen escaping
Heinz Mauelshagen [Mon, 27 Mar 2017 14:45:48 +0000 (16:45 +0200)]
man-generator/man/help: simplify hyphen escaping

Commits a29bb6a14b5e920092495fb9a1623e527d22daac
    ... 5c199d99f4dc9911d62673baba7643ea649ffe64
narrowed down on addressing the escaping of hyphens
in the dynamic creation of manuals whilst avoiding
them in creating help texts.  This lead to a sequence
of slipping through hyphens adrressed by additional
patches in aforementioned commit series.

On the other hand, postprocessing dynamically man-generator
created and statically provided manuals catches all hyphens
in need of escaping.

Changes:
- revert the above commits whilst keeping man-generator
  streamlining and the detection of any '\' when generating
  help texts in order to avoid escapes to slip in

- Dynamically escape hyphens in manaual pages using sed(1)
  in the respective Makefile targets

- remove any manually added escaping on hyphens from any
  static manual sources or headers

7 years agolvchange: reject setting all raid1 images to writemostly
Heinz Mauelshagen [Sun, 26 Mar 2017 18:28:04 +0000 (20:28 +0200)]
lvchange: reject setting all raid1 images to writemostly

raid1 doesn't allow to set all images to writemostly because at
least one image is required to receive any written data immediately.

The dm-raid target will detect such invalid request and
fail it iwith a kernel error message.

Reject such request in uspace displaying a respective error message.

7 years agoman: a few more missed '-' to escape
Heinz Mauelshagen [Sat, 25 Mar 2017 02:40:02 +0000 (03:40 +0100)]
man: a few more missed '-' to escape

7 years agoman-generator: more escaped '-'
Heinz Mauelshagen [Fri, 24 Mar 2017 17:57:45 +0000 (18:57 +0100)]
man-generator: more escaped '-'

7 years agoman-generator: fix buffer length calculation
Heinz Mauelshagen [Fri, 24 Mar 2017 17:33:03 +0000 (18:33 +0100)]
man-generator: fix buffer length calculation

7 years agomake: Don't hard-code SHELL as /bin/sh
Alasdair G Kergon [Fri, 24 Mar 2017 15:29:17 +0000 (15:29 +0000)]
make: Don't hard-code SHELL as /bin/sh

7 years agoman/help: avoid escaping of '-' with --help
Heinz Mauelshagen [Fri, 24 Mar 2017 14:14:21 +0000 (15:14 +0100)]
man/help: avoid escaping of '-' with --help

7 years agoWHATS_NEW: man-generator escape '-'
Heinz Mauelshagen [Fri, 24 Mar 2017 13:31:19 +0000 (14:31 +0100)]
WHATS_NEW: man-generator escape '-'

7 years agoman-generator: cleanup escape '-'
Heinz Mauelshagen [Fri, 24 Mar 2017 13:27:59 +0000 (14:27 +0100)]
man-generator: cleanup escape '-'

7 years agoman-generator: emit escaped '-'
Heinz Mauelshagen [Fri, 24 Mar 2017 03:00:47 +0000 (04:00 +0100)]
man-generator: emit escaped '-'

7 years agoman: escape all single '-'
Heinz Mauelshagen [Fri, 24 Mar 2017 01:46:11 +0000 (02:46 +0100)]
man: escape all single '-'

7 years agoman: revert erouneous '-' escapes in Makefine.in
Heinz Mauelshagen [Fri, 24 Mar 2017 00:39:50 +0000 (01:39 +0100)]
man: revert erouneous '-' escapes in Makefine.in

7 years agoman: escape all double '-'
Heinz Mauelshagen [Fri, 24 Mar 2017 00:03:58 +0000 (01:03 +0100)]
man: escape all double '-'

7 years agotools: Reinstate lvm script processing.
Alasdair G Kergon [Thu, 23 Mar 2017 23:03:25 +0000 (23:03 +0000)]
tools: Reinstate lvm script processing.

We check for a script if the command isn't recognised (ENO_SUCH_CMD).
(Also added a few comments and fixed some whitespace.)

7 years agolibdm: typo
Heinz Mauelshagen [Thu, 23 Mar 2017 23:12:41 +0000 (00:12 +0100)]
libdm: typo

7 years agocommands: improve error message for unknown command
David Teigland [Thu, 23 Mar 2017 08:35:06 +0000 (03:35 -0500)]
commands: improve error message for unknown command

when running "lvm foo".

7 years agocommands: fix commands with run with path basename
David Teigland [Thu, 23 Mar 2017 08:06:07 +0000 (03:06 -0500)]
commands: fix commands with run with path basename

The recent command definitions commit took the command
name from argv[0] without applying basename to the value,
so a pathname, e.g. /usr/sbin, would cause lvm to not
recognize the command name.

7 years agotools: Show configuration command line in lvm version.
Alasdair G Kergon [Thu, 23 Mar 2017 01:00:49 +0000 (01:00 +0000)]
tools: Show configuration command line in lvm version.

Also update configure.in with some items recently added to the tree.

7 years agoraid: adjust to misordered raid table line output
Heinz Mauelshagen [Thu, 23 Mar 2017 00:20:00 +0000 (01:20 +0100)]
raid: adjust to misordered raid table line output

This commit supersedes reverted 1e4462dbfbd2bbe3590936df24b3ccd83110b158
to avoid changes to liblvm and the libdm API completely.

The libdevmapper interface compares existing table line retrieved from
the kernel to new table line created to decide if it can suppress a reload.
Any difference between input and output of the table line is taken to be a
change thus causing a table reload.

The dm-raid target started to misorder the raid parameters (e.g. 'raid10_copies')
starting with dm-raid target version 1.9.0 up to (excluding) 1.11.0.  This causes
runtime failures (limited to raid10 as of tests) and needs to be reversed to allow
e.g. old lvm2 uspace to run properly.

Check for the aforementioned version range in libdm and adjust creation of the table line
to the respective (mis)ordered sequence inside and correct order outside the range
(as described for the raid target in the kernels Documentation/device-mapper/dm-raid.txt).

7 years agoRevert "raid: adjust to misordered raid table line output"
Heinz Mauelshagen [Wed, 22 Mar 2017 16:50:51 +0000 (17:50 +0100)]
Revert "raid: adjust to misordered raid table line output"

This reverts commit 1e4462dbfbd2bbe3590936df24b3ccd83110b158
in favour of an enhanced solution avoiding changes in liblvm
completetly by checking the target versions in libdm and emitting
the respective parameter lines.

7 years agocommands: fix combined thin pool and vol create defs
David Teigland [Tue, 21 Mar 2017 02:48:22 +0000 (21:48 -0500)]
commands: fix combined thin pool and vol create defs

Fixes command defs related to creating a new thin pool and
then a new thin lv in the new pool.

1. lvcreate --size --virtualsize --thinpool
   Needs a cmd def, it was missing.
   The def is unique by the three required
   options: size, virtualsize and thinpool.

2. lvcreate --size --virtualsize --thinpool VG
   Needs a cmd def, it was missing.
   The def is unique by the three required
   options: size, virtualsize and thinpool,
   and one required positional arg: VG.

3. lvcreate --thin --virtualsize --size LV_new|VG
   This existing def should not accept an optional
   --type thin, which if used makes it indistinct
   from another def.

4. lvcreate --size --virtualsize VG
   This existing def should not accept an optional
   --type thin or --thin, which if used makes it
   indistinct from other defs (e.g. 3)

7 years agoRevert "lvcreate: continue to accept --thinpool with -L and -V but not -T"
David Teigland [Wed, 22 Mar 2017 01:38:47 +0000 (20:38 -0500)]
Revert "lvcreate: continue to accept --thinpool with -L and -V but not -T"

This reverts commit 642d682d8ddcc3152f68b3ec8518902a0ef448ac.

Using the thinpool option with this cmd def makes it
indistinct from other cmd defs where thinpool is a
required option.

7 years agometadata: cleanup flags definition to be consistent
Heinz Mauelshagen [Tue, 21 Mar 2017 23:29:49 +0000 (00:29 +0100)]
metadata: cleanup flags definition to be consistent

Use shift bitops throughout segtype.h.

7 years agoWHATS_NEW: adjust to misordered raid parameters
Heinz Mauelshagen [Tue, 21 Mar 2017 17:18:58 +0000 (18:18 +0100)]
WHATS_NEW: adjust to misordered raid parameters

7 years agoraid: adjust to misordered raid table line output
Heinz Mauelshagen [Tue, 21 Mar 2017 17:17:42 +0000 (18:17 +0100)]
raid: adjust to misordered raid table line output

The libdevmapper interface compares existing table line retrieved from
the kernel to new table line created to decide if it can suppress a reload.
Any difference between input and output of the table line is taken to be a
change thus causing a table reload.

The dm-raid target started to misorder the raid parameters (e.g. 'raid10_copies')
starting with dm-raid target version 1.9.0 up to (excluding) 1.11.0.  This causes
runtime failures (limited to raid10 as of tests) and needs to be reversed to allow
e.g. old lvm2 uspace to run properly.

Check for the aforementioned version range and adjust creation of the table line
to the respective (mis)ordered sequence inside and correct order outside the range
(as described for the raid target in the kernels Documentation/device-mapper/dm-raid.txt).

7 years agolvcreate: continue to accept --thinpool with -L and -V but not -T
Alasdair G Kergon [Mon, 20 Mar 2017 21:57:17 +0000 (21:57 +0000)]
lvcreate: continue to accept --thinpool with -L and -V but not -T

lvcreate --thinpool POOL1 -L 100M --virtualsize 100M snapper_thinp

https://bugzilla.redhat.com/1434027

(The general rule is that a command is accepted if it is unambiguous.
The combination -L -V --thinpool uniquely identifies the operation.)

7 years agoman-generator: Remove unused variable.
Alasdair G Kergon [Mon, 20 Mar 2017 16:55:30 +0000 (16:55 +0000)]
man-generator: Remove unused variable.

man-generator.c:2976:6: warning: variable "sep" set but not used

7 years agolvmdbusd: Rename ee to got_external_event
Tony Asleson [Mon, 20 Mar 2017 14:43:34 +0000 (09:43 -0500)]
lvmdbusd: Rename ee to got_external_event

This variable is global, make it more descriptive.

7 years agolvmdbusd: Update state during pv move
Tony Asleson [Wed, 15 Mar 2017 19:19:55 +0000 (14:19 -0500)]
lvmdbusd: Update state during pv move

Periodically update the state during pv move so that all the different
dbus objects reflect something close to reality during the process.

7 years agolvmdbusd: Limit state refreshes for udev events
Tony Asleson [Wed, 15 Mar 2017 18:08:19 +0000 (13:08 -0500)]
lvmdbusd: Limit state refreshes for udev events

Udev events can come in like a flood when something changes.  It really
doesn't do us any good to refresh the state of the service numerous times
when 1 would suffice.  We had something like this before, but it was
removed when we added the refresh thread.  However, we have since learned
that we need to sequence events in the correct order and block dbus
operations if we believe the state has been affected, thus udev events are
being processed on the main work queue.  This change limits spurious
work items from getting to the queue.

7 years agolvmdbusd: Call add_no_notify for *move commands
Tony Asleson [Wed, 15 Mar 2017 15:58:41 +0000 (10:58 -0500)]
lvmdbusd: Call add_no_notify for *move commands

Missed this in change when "add_no_notify" was added.  This was causing
extra external events to process when we did moves.

7 years agolvmdbusd: Only disable notify_dbus after getting external event
Tony Asleson [Wed, 15 Mar 2017 15:57:01 +0000 (10:57 -0500)]
lvmdbusd: Only disable notify_dbus after getting external event

If we always disable the sending of notify dbus events then in the case
where all the users are lvm dbus users we will be in udev handling mode
until at least 1 external lvm command occurs.  Instead we will not disable
notify dbus until after we get at least 1 external event.  This makes the
service get into the correct mode of operation faster.

7 years agotests: early detect leaking error dev
Zdenek Kabelac [Mon, 20 Mar 2017 13:18:50 +0000 (14:18 +0100)]
tests: early detect leaking error dev

lvconvert should not leak 'error' device.

(This patch is not fix the problem, just makes it more easily visible
instead of more confusing 'clvmd' trace).

7 years agoman: advise against mirrored mirror log
David Teigland [Fri, 17 Mar 2017 16:54:39 +0000 (11:54 -0500)]
man: advise against mirrored mirror log

7 years agohelp: align option list in pv/lv/vgchange cases
David Teigland [Fri, 17 Mar 2017 16:20:51 +0000 (11:20 -0500)]
help: align option list in pv/lv/vgchange cases

Align one-required options like is done for
optional options.

7 years agoraid: check target version for shrink support
Heinz Mauelshagen [Fri, 17 Mar 2017 15:46:33 +0000 (16:46 +0100)]
raid: check target version for shrink support

Starting with dm-raid target version 1.9.0 shrinking of mapped devices is supported.
Check for support being present in lvresize and lvreduce.

Related: rhbz1394048

7 years agoraid: conditionally reject convert to striped/raid; fix
Heinz Mauelshagen [Fri, 17 Mar 2017 15:03:35 +0000 (16:03 +0100)]
raid: conditionally reject convert to striped/raid; fix

Fix a logic flaw introduced in commit 17bee733d16e
preventing e.g. striped -> raid5 conversions.

Related: rhbz1191935
Related: rhbz1366296

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