]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agopre-release v2_02_145
Alasdair G Kergon [Fri, 4 Mar 2016 17:59:21 +0000 (17:59 +0000)]
pre-release

8 years agolvmdbusd: Set locale
Tony Asleson [Fri, 4 Mar 2016 16:13:04 +0000 (10:13 -0600)]
lvmdbusd: Set locale

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agodbustest.sh: Get dbus test to work on buildbot
Marian Csontos [Tue, 23 Feb 2016 08:13:01 +0000 (09:13 +0100)]
dbustest.sh: Get dbus test to work on buildbot

- stdout/stderr for test output
- debug.log* for daemon output
- use install instead of cp for DBus config
- use system bus
- DBus reloads on new file. Better having it created with correct
  permissions.

Notes:
- Squashed commits from mcsontos development branch
- Still disabled at this time

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agolibdm: config: fix dm_config_write_node and variants to properly return error on...
Peter Rajnoha [Fri, 4 Mar 2016 14:49:00 +0000 (15:49 +0100)]
libdm: config: fix dm_config_write_node and variants to properly return error on failures

The error was not propagated if _write_config (that is part of
dm_config_write_node and all its variants) was called recursively
for subsections.

8 years agocleanup: previous patch with libdm config node buffer size
Peter Rajnoha [Fri, 4 Mar 2016 14:19:09 +0000 (15:19 +0100)]
cleanup: previous patch with libdm config node buffer size

8 years agolibdm: config: remove 4096 char limit due to buffer size if writing dm_config_node
Peter Rajnoha [Fri, 4 Mar 2016 13:59:22 +0000 (14:59 +0100)]
libdm: config: remove 4096 char limit due to buffer size if writing dm_config_node

8 years agoWHATS_NEW: historical LVs
Peter Rajnoha [Fri, 4 Mar 2016 11:08:02 +0000 (12:08 +0100)]
WHATS_NEW: historical LVs

8 years agoman: lvrename: also mention possibility to rename historical logical volumes
Peter Rajnoha [Fri, 4 Mar 2016 10:51:57 +0000 (11:51 +0100)]
man: lvrename: also mention possibility to rename historical logical volumes

8 years agocleanup: comment in the code for renaming historical LVs
Peter Rajnoha [Fri, 4 Mar 2016 10:46:29 +0000 (11:46 +0100)]
cleanup: comment in the code for renaming historical LVs

8 years agolvrename: support renaming historical logical volumes
Peter Rajnoha [Fri, 4 Mar 2016 10:36:24 +0000 (11:36 +0100)]
lvrename: support renaming historical logical volumes

8 years agocommands: lvdisplay: recognize -H|--history switch
Peter Rajnoha [Fri, 4 Mar 2016 09:27:45 +0000 (10:27 +0100)]
commands: lvdisplay: recognize -H|--history switch

8 years agotests: direct control of lvm1 usage in tests
David Teigland [Wed, 2 Mar 2016 22:49:32 +0000 (16:49 -0600)]
tests: direct control of lvm1 usage in tests

Using lvm1 metadata with lvmetad is not generally allowed,
but nothing has prevented creating new lvm1 metadata with
lvmetad (missing error checking in pvcreate/vgcreate.)
Various tests are using lvm1 with lvmetad and happen to
work because of the missing error checks.

This commit fixes the tests so they won't fail when the
lvm1/lvmetad error checking is fixed.  A new variable
LVM_TEST_LVM1 is defined and is used in the scripts to
decide if lvm1 metadata should be tested.  LVM_TEST_LVM1
is not defined when lvmetad is being tested, and the
combination of LVM_TEST_LVM1 and LVM_TEST_LVMETAD can
be used to verify the desired lvmetad+lvm1 behavior.

8 years agoman: Add some information about historical LVs.
Alasdair G Kergon [Thu, 3 Mar 2016 17:09:25 +0000 (17:09 +0000)]
man: Add some information about historical LVs.

8 years agotests: add lv-ancestry.sh test
Peter Rajnoha [Tue, 1 Mar 2016 14:32:32 +0000 (15:32 +0100)]
tests: add lv-ancestry.sh test

8 years agotests: add "get lvh_field" for "lvs -H"
Peter Rajnoha [Tue, 1 Mar 2016 14:32:20 +0000 (15:32 +0100)]
tests: add "get lvh_field" for "lvs -H"

8 years agolvmdump: also list historical LVs in lvmdump
Peter Rajnoha [Thu, 3 Mar 2016 09:36:58 +0000 (10:36 +0100)]
lvmdump: also list historical LVs in lvmdump

8 years agometadata: automatically remove invalid (dangling) historical LVs
Peter Rajnoha [Wed, 2 Mar 2016 11:19:07 +0000 (12:19 +0100)]
metadata: automatically remove invalid (dangling) historical LVs

Historical LV is valid as long as there is at least one live LV among
its ancestors. If we find any invalid (dangling) historical LVs, remove
them automatically.

8 years agometadata: also validate historical LVs in VG in vg_validate and check_lv_segments
Peter Rajnoha [Tue, 1 Mar 2016 14:32:01 +0000 (15:32 +0100)]
metadata: also validate historical LVs in VG in vg_validate and check_lv_segments

8 years agometadata: also look at historical LVs when checking LV name availability
Peter Rajnoha [Tue, 1 Mar 2016 14:31:48 +0000 (15:31 +0100)]
metadata: also look at historical LVs when checking LV name availability

Live LVs and historical LVs are in one namespace and the name needs to
be unique in whole VG.

8 years agoconf: regenerate example.conf.in
Peter Rajnoha [Tue, 1 Mar 2016 14:31:29 +0000 (15:31 +0100)]
conf: regenerate example.conf.in

8 years agoconf: add metadata/lvs_history_timeout configuration setting
Peter Rajnoha [Tue, 1 Mar 2016 14:29:27 +0000 (15:29 +0100)]
conf: add metadata/lvs_history_timeout configuration setting

8 years agometadata: add vg_strip_outdated_historical_lvs fn and call it during VG read
Peter Rajnoha [Tue, 1 Mar 2016 14:27:21 +0000 (15:27 +0100)]
metadata: add vg_strip_outdated_historical_lvs fn and call it during VG read

The vg_strip_outdated_historical_lvs iterates over the list of historical LVs
we have and it shoots down the ones which are outdated.

Configuration hook to set the timeout will be in subsequent patch.

8 years agocommands: lvremove: also process historical LVs
Peter Rajnoha [Tue, 1 Mar 2016 14:27:08 +0000 (15:27 +0100)]
commands: lvremove: also process historical LVs

8 years agometadata: add historical_glv_remove
Peter Rajnoha [Tue, 1 Mar 2016 14:26:57 +0000 (15:26 +0100)]
metadata: add historical_glv_remove

8 years agoconf: add metadata/record_lvs_history configuration setting
Peter Rajnoha [Tue, 1 Mar 2016 14:25:49 +0000 (15:25 +0100)]
conf: add metadata/record_lvs_history configuration setting

The metadata/record_lvs_history is global switch which enables or
disables recording historical LVs in metadata.

If both metadata/record_lvs_history=1 lvm.conf option and
--nohistory command switch is used at the same time, the
--nohistory prevails.

8 years agocommands: lvremove: recognize --nohistory option
Peter Rajnoha [Tue, 1 Mar 2016 14:25:37 +0000 (15:25 +0100)]
commands: lvremove: recognize --nohistory option

8 years agometadata: honour 'nohistory' switch when removing thin LVs
Peter Rajnoha [Tue, 1 Mar 2016 14:25:28 +0000 (15:25 +0100)]
metadata: honour 'nohistory' switch when removing thin LVs

When --nohistory switch is used with lvremove, the LV that is removed is
not recorded in metadata as 'historical LV'.

8 years agocmd: add 'nohistory' option and wire it up in cmd_context
Peter Rajnoha [Tue, 1 Mar 2016 14:25:14 +0000 (15:25 +0100)]
cmd: add 'nohistory' option and wire it up in cmd_context

The --nohistory switch will cause historical LVs to not be recorded
in metadata on demand.

8 years agoreport: add new 'none' lv_layout and 'history' lv_role and mark historical LVs that way
Peter Rajnoha [Tue, 1 Mar 2016 14:25:04 +0000 (15:25 +0100)]
report: add new 'none' lv_layout and 'history' lv_role and mark historical LVs that way

Report proper values for historical LVs in lv_layout and lv_role fields.
Any historical LV doesn't have any layout anymore and the role is "history".

For example:

$ lvs -H -o name,lv_attr,lv_layout,lv_role vg/-lvol1
  LV     Attr       Layout     Role
  -lvol1 ----h----- none       public,history

8 years agoreport: add full_descendants field to display descendants with history
Peter Rajnoha [Tue, 1 Mar 2016 14:24:48 +0000 (15:24 +0100)]
report: add full_descendants field to display descendants with history

Same as lv_full_ancestors, but the other way round in the ancestry chain.

8 years agoreport: add full_ancestors field to display ancestors with history
Peter Rajnoha [Tue, 1 Mar 2016 14:24:40 +0000 (15:24 +0100)]
report: add full_ancestors field to display ancestors with history

The lv_full_ancestors reporting field is just like the existing
lv_ancestors field but it also takes into account any history and
indirect relations recorded.

8 years agoreport: report historical LV names with '-' prefix
Peter Rajnoha [Tue, 1 Mar 2016 14:24:07 +0000 (15:24 +0100)]
report: report historical LV names with '-' prefix

All names for historical LVs are prefixed with '-' character to make clear
difference between live and historical LVs. The '-' can't be set by users
for live LV names during lvcreate hence we never get into a conflict with
the names that user defines for live LVs.

8 years agoreport: display (h)istorical state in lv_attr field
Peter Rajnoha [Tue, 1 Mar 2016 14:23:58 +0000 (15:23 +0100)]
report: display (h)istorical state in lv_attr field

The 'historical' state is displayed as 5th bit ("state") in the lv_attr
field and denoted by new 'h' character.

8 years agoreport: add lv_historical field to identify historical LVs
Peter Rajnoha [Tue, 1 Mar 2016 14:23:43 +0000 (15:23 +0100)]
report: add lv_historical field to identify historical LVs

The lv_historical reporting field is a simple binary field that reports
whether an LV is historical one ("historical" value or value of "1" displayed)
or not (blank string "" or value of "0" displayed).

8 years agocommands: lvs: recognize -H|--history switch
Peter Rajnoha [Tue, 1 Mar 2016 14:23:34 +0000 (15:23 +0100)]
commands: lvs: recognize -H|--history switch

When lvs command is used together with the -H|--history switch,
all historical LVs are reported as well.

8 years agoreport: display lv_name,lv_uuid,vg_name,lv_time and new lv_time_removed for historica...
Peter Rajnoha [Tue, 1 Mar 2016 14:23:23 +0000 (15:23 +0100)]
report: display lv_name,lv_uuid,vg_name,lv_time and new lv_time_removed for historical LVs

8 years agotoollib: honour '-H|--history' switch while executing process_each_lv_in_vg
Peter Rajnoha [Tue, 1 Mar 2016 14:23:05 +0000 (15:23 +0100)]
toollib: honour '-H|--history' switch while executing process_each_lv_in_vg

When processing LVs in a VG and when the -H|--history switch is used,
make process_each_lv_in_vg to iterate over historical volumes too.

For each historical LV, we use dummy struct logical_volume instance with
the "this_glv" reference set to a wrapper over proper struct
historical_logical_volume representation. This makes it possible to process
historical LVs just like normal live LVs (though a dummy one without any
segments and all the other fields zeroed and blank) and it also allows
for using all historical LV related information via lv->this_glv->historical
reference.

One can use a simple call to lv_is_historical to make a difference between
live and historical LV in all the code that is called by process_each_* fns.

8 years agocmd: add '-H|--history' switch and wire it up in cmd_context and processing_handle
Peter Rajnoha [Tue, 1 Mar 2016 14:22:48 +0000 (15:22 +0100)]
cmd: add '-H|--history' switch and wire it up in cmd_context and processing_handle

This patch adds "include_historical_lvs" field to struct cmd_context to
make it possible for the command to switch between original funcionality
where no historical LVs are processed and functionality where historical
LVs are taken into account (and reported or processed further). The switch
between these modes is done using the '-H|--history' switch on command
line.

The include_historical_lvs state is then passed to process_each_* fns
using the "include_historical_lvs" field within struct processing_handle.

8 years agometadata: add lv_is_historical fn to test if the LV is historical one
Peter Rajnoha [Tue, 1 Mar 2016 14:22:36 +0000 (15:22 +0100)]
metadata: add lv_is_historical fn to test if the LV is historical one

8 years agometadata: format_text: interconnect historical LVs among each other and also with...
Peter Rajnoha [Tue, 1 Mar 2016 14:22:28 +0000 (15:22 +0100)]
metadata: format_text: interconnect historical LVs among each other and also with live LVs

Interconnect historical LVs in an ancestry chain and also connect the first/last
one with its live ancestor/descendant if it exists.

8 years agometadata: add support for interconnection of thin pool LV segment with indirect origin
Peter Rajnoha [Tue, 1 Mar 2016 14:21:36 +0000 (15:21 +0100)]
metadata: add support for interconnection of thin pool LV segment with indirect origin

Add support for making an interconnection between thin LV segment and
its indirect origin (which may be historical or live LV) - add a new
"indirect_origin" argument to attach_pool_lv function.

8 years agometadata: add find_historical_glv fn
Peter Rajnoha [Tue, 1 Mar 2016 14:21:21 +0000 (15:21 +0100)]
metadata: add find_historical_glv fn

The find_historical_glv is helper function that looks up historical
LV in struct volume_group's historical_lvs list and returns it if
found.

8 years agometadata: format_text: import historical LVs
Peter Rajnoha [Tue, 1 Mar 2016 14:54:02 +0000 (15:54 +0100)]
metadata: format_text: import historical LVs

Import historical LV list from metadata and add it to struct
volume_group's historical_lvs list.

8 years agometadata: format_text: reuse _print_timestamp fn
Peter Rajnoha [Tue, 1 Mar 2016 14:21:05 +0000 (15:21 +0100)]
metadata: format_text: reuse _print_timestamp fn

8 years agometadata: format_text: also export historical LVs
Peter Rajnoha [Tue, 1 Mar 2016 14:20:49 +0000 (15:20 +0100)]
metadata: format_text: also export historical LVs

Also export historical LVs when exporting LVM2 metadata.
This is list of all historical LVs listed in
"historical_logical_volumes" metadata section with all
the properties exported for each historical LV.

For example, we have this thin snapshot sequence:

  lvol1 --> lvol2 --> lvol3
                 \
                  --> lvol4

We end up with these metadata:

logical_volume {
  ...
  (lvol1, lvol3 and lvol4 listed here as usual - no change here)
  ...
}

historical_logical_volumes {
  lvol2 {
    id = "S0Dw1U-v5sF-LwAb-W9SI-pNOF-Madd-5dxSv5"
    creation_time = 1456919613      # 2016-03-02 12:53:33 +0100
    removal_time = 1456919620       # 2016-03-02 12:53:40 +0100
    origin = "lvol1"
    descendants = ["lvol3", "lvol4"]
  }
}

By removing lvol1 further, we end up with:

historical_logical_volumes {
  lvol2 {
    id = "S0Dw1U-v5sF-LwAb-W9SI-pNOF-Madd-5dxSv5"
    creation_time = 1456919613      # 2016-03-02 12:53:33 +0100
    removal_time = 1456919620       # 2016-03-02 12:53:40 +0100
    origin = "-lvol1"
    descendants = ["lvol3", "lvol4"]
  }

  lvol1 {
    id = "me0mes-aYnK-nRfT-vNlV-UiR1-GP7r-ojbROr"
    creation_time = 1456919608      # 2016-03-02 12:53:28 +0100
    removal_time = 1456919767       # 2016-03-02 12:56:07 +0100
  }
}

8 years agometadata: create historical LVs when LVs are removed and interconnect with live LVs
Peter Rajnoha [Tue, 1 Mar 2016 14:20:09 +0000 (15:20 +0100)]
metadata: create historical LVs when LVs are removed and interconnect with live LVs

When an LV is being removed, we create an instance of
"struct historical_logical_volume" wrapped up in
"struct generic_logical_volume".

All instances of "struct historical_logical_volume" are then recorded in
"historical_lvs" list which is part of "struct volume_group".

The "historical LV" is then interconnected with "live LVs" to
connect a history chain for the live LV.

8 years agometadata: add add_glv_to_indirect_glvs and remove_glv_from_indirect_glvs
Peter Rajnoha [Tue, 1 Mar 2016 14:19:57 +0000 (15:19 +0100)]
metadata: add add_glv_to_indirect_glvs and remove_glv_from_indirect_glvs

The add_glv_to_indirect_glvs is a helper function that registers a
volume represented by struct generic_logical_volume instance ("glv")
as an indirect user of another volume ("origin_glv") and vice versa -
it also registers the other volume ("origin_glv") as indirect_origin
of user volume ("glv").

The remove_glv_from_indirect_glvs does the opposite.

8 years agometadata: add get_or_create_glv and get_or_create_glvl
Peter Rajnoha [Tue, 1 Mar 2016 14:19:23 +0000 (15:19 +0100)]
metadata: add get_or_create_glv and get_or_create_glvl

The get_or_create_glv is helper function that retrieves any existing
generic_logical_volume wrapper for the LV. If the wrapper does not exist
yet, it's created.

The get_org_create_glvl is the same as get_or_create_glv but it creates
the glv_list wrapper in addition so it can be added to a list.

8 years agometadata: add infrastructure to track LV history
Peter Rajnoha [Tue, 1 Mar 2016 14:18:42 +0000 (15:18 +0100)]
metadata: add infrastructure to track LV history

Add new structures and new fields in existing structures to support
tracking history of LVs (the LVs which don't exist - the have been
removed already):

  - new "struct historical_logical_volume"
    This structure keeps information specific to historical LVs
    (historical LV is very reduced form of struct logical_volume +
     it contains a few specific fields to track historical LV
     properties like removal time and connections among other LVs).

  - new "struct generic_logical_volume"
    Wrapper for "struct historical_logical_volume" and
    "struct logical_volume" to make it possible to handle volumes
    in uniform way, no matter if it's live or historical one.

  - new "struct glv_list"
    Wrapper for "struct generic_logical_volume" so it can be
    added to a list.

  - new "indirect_glvs" field in "struct logical_volume"
    List that stores references to all indirect users of this LV - this
    interconnects live LV with historical descendant LVs or even live
    descendant LVs.

  - new "indirect_origin" field in "struct lv_segment"
    Reference to indirect origin of this segment - this interconnects
    live LV (segment) with historical ancestor.

  - new "this_glv" field in "struct logical_volume"
    This references an existing generic_logical_volume wrapper for this
    LV, if used. It can be NULL if not needed - which means we're not
    handling historical LVs at all.

  - new "historical_lvs" field in "struct volume group
    List of all historical LVs read from VG metadata.

8 years agotests: drop check for md5sum
Zdenek Kabelac [Wed, 2 Mar 2016 10:12:00 +0000 (11:12 +0100)]
tests: drop check for md5sum

8 years agotests: check kernel_cache_ funcs
Zdenek Kabelac [Wed, 2 Mar 2016 10:12:14 +0000 (11:12 +0100)]
tests: check kernel_cache_ funcs

8 years agocleanup: use lv_is_partial
Zdenek Kabelac [Wed, 2 Mar 2016 19:59:03 +0000 (20:59 +0100)]
cleanup: use lv_is_partial

Check for PARTIAL_LV flag in standard way.

8 years agocleanup: use _field_string
Zdenek Kabelac [Wed, 2 Mar 2016 10:50:12 +0000 (11:50 +0100)]
cleanup: use _field_string

Make at least some 'advantage' in use local func and do dereference
internally from char pointer and use short list of params.

8 years agoman: minor updates
Zdenek Kabelac [Wed, 2 Mar 2016 22:51:59 +0000 (23:51 +0100)]
man: minor updates

Minor fixes in few pages.

8 years agoman: lvconvert updates
Zdenek Kabelac [Wed, 2 Mar 2016 22:51:16 +0000 (23:51 +0100)]
man: lvconvert updates

Improving style (following lvcreate way).
Sorting options alphabetically.

8 years agocache: add kernel_cache_policy option
Zdenek Kabelac [Wed, 2 Mar 2016 10:12:46 +0000 (11:12 +0100)]
cache: add kernel_cache_policy option

Pair kernel_cache_settings with kernel_cache_policy.
There is very small chance in error case that the value in table
might be differnet from the value stored in metadata
so make it 'checkable'.

8 years agoWHATS_NEW: [unknown] replaces 'unknown device'
David Teigland [Tue, 1 Mar 2016 17:16:35 +0000 (11:16 -0600)]
WHATS_NEW: [unknown] replaces 'unknown device'

8 years agopvs: replace 'unknown device' with [unknown]
David Teigland [Mon, 29 Feb 2016 19:38:31 +0000 (13:38 -0600)]
pvs: replace 'unknown device' with [unknown]

A config setting can restore the old string.

8 years agocleanup: missplaced .
Zdenek Kabelac [Tue, 1 Mar 2016 16:20:47 +0000 (17:20 +0100)]
cleanup: missplaced .

Remove misplaced '.' after '?'
Drop extra   'stack;'  after log_debug().

8 years agomakefile: handle dm-version-expected
Zdenek Kabelac [Tue, 1 Mar 2016 15:03:02 +0000 (16:03 +0100)]
makefile: handle dm-version-expected

8 years agoman: fix mising braces
Zdenek Kabelac [Tue, 1 Mar 2016 12:40:32 +0000 (13:40 +0100)]
man: fix mising braces

Fixing some reported issued found by:
http://catb.org/~esr/doclifter/bugs.html

Reported-by: Eric S. Raymond <esr at thyrsus.com>
8 years agocleanup: indent and dots
Zdenek Kabelac [Tue, 1 Mar 2016 10:41:09 +0000 (11:41 +0100)]
cleanup: indent and dots

8 years agocoverity: eliminate DEADCODE
Zdenek Kabelac [Tue, 1 Mar 2016 12:58:15 +0000 (13:58 +0100)]
coverity: eliminate DEADCODE

Coverity notice this cannot be NULL: cur = &dms->regions[*cur_r]
so avoid NULL checking and simplify form.

8 years agocoverity: missing error path
Zdenek Kabelac [Tue, 1 Mar 2016 10:40:53 +0000 (11:40 +0100)]
coverity: missing error path

8 years agoupdate WHATS_NEW
David Teigland [Mon, 29 Feb 2016 19:50:02 +0000 (13:50 -0600)]
update WHATS_NEW

including changes not recorded for the previous release.

8 years agotests: check [unknown] in lvmetad-pvscan-cache
David Teigland [Mon, 29 Feb 2016 18:43:07 +0000 (12:43 -0600)]
tests: check [unknown] in lvmetad-pvscan-cache

Update test for new [unknown] VG name from
commit 250b9153.

8 years agopvs: display VG name [unknown] for used PV without metadata
David Teigland [Fri, 26 Feb 2016 21:06:20 +0000 (15:06 -0600)]
pvs: display VG name [unknown] for used PV without metadata

Rather than displaying a blank field for VG name.

8 years agopost-release
Alasdair G Kergon [Fri, 26 Feb 2016 21:14:12 +0000 (21:14 +0000)]
post-release

8 years agopre-release v2_02_144
Alasdair G Kergon [Fri, 26 Feb 2016 21:03:30 +0000 (21:03 +0000)]
pre-release

8 years agoreport: Shift (u)sed pv_attr under (a)llocatable.
Alasdair G Kergon [Fri, 26 Feb 2016 15:46:37 +0000 (15:46 +0000)]
report: Shift (u)sed pv_attr under (a)llocatable.

Showing 'u' in the pv_attr reporting field is mostly unnecessary because
most PVs are allocatable, and being allocatable implies it is (u)sed,
and this is already obvious from other fields in the default 'pvs'
output like the VG name.

So move the new (u)sed pv_attr from character position 4 to 1, and only
show it in those rare cases when the PV is not (a)llocatable or the
relevant metadata is missing.

(Scripts should not be using pv_attr, but rather pv_allocatable,
pv_exported, pv_missing, pv_in_use etc.)

8 years agotests: skip on older version
Zdenek Kabelac [Fri, 26 Feb 2016 07:45:06 +0000 (08:45 +0100)]
tests: skip on older version

Skip with older driver version.
Update address.

8 years agocoverity: helping coverity with NULL pointer
Zdenek Kabelac [Fri, 26 Feb 2016 09:15:24 +0000 (10:15 +0100)]
coverity: helping coverity with NULL pointer

Helping with understanding we will not try to deref NULL pointer,
as if the sizes are initialized to NULL it also means 'mem' would
be NULL, but thats too hard to model so make it obvious.

8 years agomakefiles: add more dirs for lcov output
Zdenek Kabelac [Fri, 26 Feb 2016 09:14:39 +0000 (10:14 +0100)]
makefiles: add more dirs for lcov output

New daemons were missing in generated lcov output.

8 years agodbus: fix the systemd service providing the DBus service
Vratislav Podzimek [Thu, 25 Feb 2016 15:34:41 +0000 (16:34 +0100)]
dbus: fix the systemd service providing the DBus service

Correct name is lvm2-lvmdbusd.service not lvmdbusd.service.
This makes the bus-activation (auto-activation) work.

Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
8 years agopvcreate: fix data alignment error check
David Teigland [Thu, 25 Feb 2016 22:57:01 +0000 (16:57 -0600)]
pvcreate: fix data alignment error check

Make the data_alignment variable 64 bits so it
can hold the invalid command line arg used in
pvreate-usage.sh pvcreate --dataalignment 1e.

On 32 bit arches, the smaller variable wouldn't
hold the invalid value so the error would not
trigger as expected by the test.

8 years agolvmdbusd: Do only 1 refresh for Vg.Change()
Tony Asleson [Thu, 25 Feb 2016 22:34:51 +0000 (16:34 -0600)]
lvmdbusd: Do only 1 refresh for Vg.Change()

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agolvmdbusd testing: Add validatestate.py utility
Tony Asleson [Thu, 25 Feb 2016 22:12:53 +0000 (16:12 -0600)]
lvmdbusd testing: Add validatestate.py utility

This simple tool calls the Manager.Refresh method on the dbus service
to check and see if the dbus service has the most up to date state.
This is to be used for testing to ensure that event driven updates are
working as planned.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agolvmdbustest.py: Move helper code to testlib.py
Tony Asleson [Thu, 25 Feb 2016 22:11:08 +0000 (16:11 -0600)]
lvmdbustest.py: Move helper code to testlib.py

This will allow us to re-use in other client programs for testing.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agolvmdbusd: Reduce unnecessary state refreshes
Tony Asleson [Thu, 25 Feb 2016 20:57:12 +0000 (14:57 -0600)]
lvmdbusd: Reduce unnecessary state refreshes

When we use udev or have lvm call back into the dbus service when a
change occurs, even if that change originated from the dbus service
we end up refreshing the state of the system twice which is not
needed or wanted.  This change handles this case by removing any
pending refreshes in the worker queue if the state of the system
was just updated.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
8 years agopvcreate: fix error from pv_write
David Teigland [Thu, 25 Feb 2016 22:38:59 +0000 (16:38 -0600)]
pvcreate: fix error from pv_write

After a pv_write() failure, the PV wasn't being skipped.

8 years agotests: lvresize with zero arg
Zdenek Kabelac [Thu, 25 Feb 2016 20:58:43 +0000 (21:58 +0100)]
tests: lvresize with zero arg

8 years agocleanup: drop unneeded test
Zdenek Kabelac [Thu, 25 Feb 2016 15:51:14 +0000 (16:51 +0100)]
cleanup: drop unneeded test

dmfree tests for NULL

8 years agocleanup: indent
Zdenek Kabelac [Thu, 25 Feb 2016 15:50:22 +0000 (16:50 +0100)]
cleanup: indent

Last update missed to indent params.

8 years agocleanup: poll better check for internal errors
Zdenek Kabelac [Thu, 25 Feb 2016 12:31:31 +0000 (13:31 +0100)]
cleanup: poll better check for internal errors

8 years agolvconvert: use lp->repair
Zdenek Kabelac [Thu, 25 Feb 2016 14:12:17 +0000 (15:12 +0100)]
lvconvert: use lp->repair

Set variable for repair testing.

8 years agolvconvert: use more display_lvname
Zdenek Kabelac [Thu, 25 Feb 2016 14:01:12 +0000 (15:01 +0100)]
lvconvert: use more display_lvname

8 years agolvconvert: simplify handler processing
Zdenek Kabelac [Thu, 25 Feb 2016 11:15:26 +0000 (12:15 +0100)]
lvconvert: simplify handler processing

Easier code for handler init.
Drop release of pool mem - not needed, as command pool get dropped just
later.

8 years agolvconvert: fix vg parameter
Zdenek Kabelac [Thu, 25 Feb 2016 19:40:28 +0000 (20:40 +0100)]
lvconvert: fix vg parameter

Since we want to read env LVM_VG_NAME vg names,
we cannot just check LV names which do contain '/'.

So before the patch commands like:

> lvconvert --repair vg

Before:

Please provide a valid volume group name

After:
Path required for Logical Volume "vg".
Please provide a valid volume group name

> LVM_VG_NAME=vg lvconvert --repair vg

Before:
Please provide a valid volume group name

After:
Can't find LV vg in VG vg

8 years agolvresize: fix regression with zero size arg
Zdenek Kabelac [Thu, 25 Feb 2016 21:44:31 +0000 (22:44 +0100)]
lvresize: fix regression with zero size arg

Commit ca878a3426197b629c76e98cfc049948da470cd7 introduced an issue
that zero sized extesion suddenly started to be accepted and
missed to return error.

Properly check invalid input values for sizes.

8 years agoUse a common message for a used PV
David Teigland [Thu, 25 Feb 2016 20:12:08 +0000 (14:12 -0600)]
Use a common message for a used PV

Change some inconsistent messages and adopt
the new wording "PV %s is used by" in place
of "PV %s is marked as belonging to"
or "PV %s belongs to".

8 years agopvcreate: fix setting uuid arg
David Teigland [Thu, 25 Feb 2016 17:56:24 +0000 (11:56 -0600)]
pvcreate: fix setting uuid arg

Commit 4de6caf5 ("redefine pvcreate structs") left
out setting the "idp" pointer to the "id" arg.

8 years agotests: add simple dmstats report tests dev-bmr-dmstats-tests
Bryn M. Reeves [Thu, 18 Feb 2016 16:52:37 +0000 (16:52 +0000)]
tests: add simple dmstats report tests

Add tests for the "dmstats report" command:

  * report
  * report --count
  * report --histogram

So far the tests just check the command runs as expected when a
correctly configured stats region exists: validation of output
can be added later.

8 years agotests: add dmstats create tests
Bryn M. Reeves [Fri, 11 Dec 2015 17:16:23 +0000 (17:16 +0000)]
tests: add dmstats create tests

Add tests for the "dmstats create" command:

  * simple whole-device region
  * region using --start/--len options
  * region using --segments option
  * region with precise timestamps (--precise)
  * region with histogram bounds (--bounds)

8 years agotests: make lib/expected-version-dm a dependency of .tests-stamp
Bryn M. Reeves [Fri, 11 Dec 2015 13:18:40 +0000 (13:18 +0000)]
tests: make lib/expected-version-dm a dependency of .tests-stamp

8 years agotests: install does not depend on lib/version-expected
Bryn M. Reeves [Fri, 11 Dec 2015 13:17:08 +0000 (13:17 +0000)]
tests: install does not depend on lib/version-expected

The install target already depends on .tests-stamp - since this
in turn depends on lib/version-expected there is no need to have
this as a dependency of install.

8 years agotests: add template tests/shell/dmstats-create.sh
Bryn M. Reeves [Fri, 27 Nov 2015 17:57:33 +0000 (17:57 +0000)]
tests: add template tests/shell/dmstats-create.sh

Add a template for testing 'dmstats create' operations.

8 years agotests: add driver_at_least() to aux.sh
Bryn M. Reeves [Fri, 27 Nov 2015 17:55:08 +0000 (17:55 +0000)]
tests: add driver_at_least() to aux.sh

Add a function to test whether the running device-mapper driver
version is at least equal to some given version.

8 years agotests: add basic dmstats tests
Bryn M. Reeves [Thu, 26 Nov 2015 17:11:40 +0000 (17:11 +0000)]
tests: add basic dmstats tests

Add initial dmstats tests to 000-basic.sh. These tests ensure that
the dmsetup binary is built and linked correctly when called as
'dmstats' and that the version of the binary matches the expected
library version used for the build.

8 years agodmstats: create dmstats symlink in test/lib
Bryn M. Reeves [Thu, 26 Nov 2015 12:37:22 +0000 (12:37 +0000)]
dmstats: create dmstats symlink in test/lib

Create a symbolic link in test/lib for 'dmstats', pointing to the
dmsetup binary in the tools/ build directory.

8 years agolvmcache: fix missing free of vginfo->system_id causing mem leak
Peter Rajnoha [Thu, 25 Feb 2016 15:24:48 +0000 (16:24 +0100)]
lvmcache: fix missing free of vginfo->system_id causing mem leak

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