summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* system_id: use for VG ownershipdev-dct-systemid-final1David Teigland2015-02-1126-51/+795
| | | | See included lvmsystemid(7) for full description.
* report: define ba_start, vg_free and seg_start fields as ↵Peter Rajnoha2015-02-112-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DM_REPORT_FIELD_TYPE_SIZE instead of DM_REPORT_FIELD_TYPE_NUM This makes a difference when using selection criteria based on these fields - if those fields are defined as DM_REPORT_FIELD_TYPE_SIZE (in contrast to DM_REPORT_FIELD_TYPE_NUMBER), units are also recognize in selection clause. For example: $ lvs -o+seg_start vg1/lv2 LV VG Attr LSize Start lv2 vg1 -wi-a----- 12.00m 0 lv2 vg1 -wi-a----- 12.00m 8.00m Before this patch: $ lvs -o+seg_start --select 'seg_start=8m' Found size unit specifier but numeric value expected for selection field seg_start. Selection syntax error at 'seg_start=8m'. Use 'help' for selection to get more help. With this patch applied: $lvs -o+seg_start --select 'seg_start=8m' LV VG Attr LSize Start lv2 vg1 -wi-a----- 12.00m 8.00m (the same applies for ba_start and vg_free fields)
* conf: update profile templates for recent changesPeter Rajnoha2015-02-112-1/+2
|
* man: reference -S/--select in {vg,lv,pv}change, {vg,lv}remove, ↵Peter Rajnoha2015-02-1111-19/+29
| | | | {vg,lv,pv}display and vg{import,export} man pages
* toollib: select: issue an error message for failed VG/LV/PV selectionPeter Rajnoha2015-02-111-6/+12
|
* man: dumpconfig: mention LVM_COMMAND_PROFILE env var and add more references ↵Peter Rajnoha2015-02-111-3/+6
| | | | | | | | | | | | | | to --mergedconfig option The LVM_COMMAND_PROFILE env var is new - mention it in dumpconfig's man page. Also, dumpconfig always displays the top of the config cascade. To display all the config found in the cascade merged (just like it's used during LVM command processing), --mergedconfig option must be used - this one's already described in that man page, just make sure it's clear and add reference for this option also in --profile/--commandprofile/--metadataprofile description.
* NIX: Drop Fedora 16 builds.Petr Rockai2015-02-101-2/+0
|
* NIX: Adjust lists of extra RPMs to install.Petr Rockai2015-02-101-8/+7
|
* test: Fix harness not building on RHEL5dev-mcsontos-rhel5-CLOEXECMarian Csontos2015-02-101-7/+17
|
* select: initialize selection handle for process_each_* fns with initial ↵Peter Rajnoha2015-02-103-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | report type This is a followup patch for previous patchset that enables selection in process_each_* fns to fix an issue where field prefixes are not automatically used for fields in selection criteria. Use initial report type that matches the intention of each process_each_* functions: - _process_pvs_in_vg - PVS - process_each_vg - VGS - process_each_lv and process_each_lv_in_vg - LVS This is not normally needed for the selection handle init, BUT we would miss the field prefix matching, e.g. lvchange -ay -S 'name=lvol0' The "name" above would not work if we didn't initialize reporting with the LVS type at its start. If we pass proper init type, reporting code can deduce the prefix automatically ("lv_name" in this case). This report type is then changed further based on what selection criteria we have. When doing pure selection, not report output, the final report type is purely based on combination of this initial report type and report types of the fields used in selection criteria.
* tools: allow -S|--select for vgexport and vgimportPeter Rajnoha2015-02-104-8/+11
|
* tools: allow -S|--select for vgdisplay, lvdisplay and pvdisplay without -CPeter Rajnoha2015-02-105-3/+4
| | | | | | | We already allowed -S|--select with {vg,lv,pv}display -C (which was then equal to {vg,lv,pv}s command. Since we support selection in toolib now, we can support -S also without using -C in *display commands now.
* tools: allow -S|--select for vgremove and lvremovePeter Rajnoha2015-02-105-9/+14
|
* tools: allow -S|--select for vgchange, lvchange and pvchangePeter Rajnoha2015-02-104-12/+16
|
* pvchange: use processing_handle when processing items for pvchangePeter Rajnoha2015-02-101-10/+35
| | | | | | pvchange is an exception that does not use toollib yet for iterating over the list of PVs (process_each_pv) so intialize the processing_handle and use just like it's used in toollib.
* report: implement report_for_selectionPeter Rajnoha2015-02-102-1/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | We have 3 input report types: - LVS (representing "_select_match_lv") - VGS (representing "_select_match_vg") - PVS (representing "_select_match_pv") The input report type is saved in struct selection_handle's "orig_report_type" variable. However, users can use any combination of fields of different report types in selection criteria - the resulting report type can thus differ. The struct selection_handle's "report_type" variable stores this resulting report type. The resulting report_type can end up as one of: - LVS - VGS - PVS - SEGS - PVSEGS This patch adds logic to report_for_selection based on (sensible) combination of orig_report_type and report_type and calls appropriate reporting functions or iterates over multiple items that need reporting to determine the selection result.
* report: add report_for_selection and use it in select_match_{pv,vg,lv}Peter Rajnoha2015-02-103-3/+42
| | | | | | The report_for_selection does the actual "reporting for selection only". The selection status will be saved in struct selection_handle's "selected" variable.
* refactor: report: factor out code to determine final report typePeter Rajnoha2015-02-101-26/+45
| | | | | | | The code to determine final report type based on combination of input report type (determined from fields used for reporting to output and selection) can be reused for pure reporting for selection - factor out this code into _get_final_report_type function.
* toollib: select the whole structure if at least one of its items is selectedPeter Rajnoha2015-02-101-0/+42
| | | | | | | | | | This applies to: - process_each_lv_in_vg - the VG is selected only if at least one of its LVs is selected - process_each_segment_in_lv - the LV is selected only if at least one of its LV segments is selected - process_each_pv_in_vg - the VG is selected only if at least one of its PVs is selected - process_each_segment_in_pv - the PV is selected only if at least one of its PV segments is selected So this patch causes the selection result to be properly propagated up to callers.
* toollib: initialize handles (including reporting for selection) for ↵Peter Rajnoha2015-02-105-52/+113
| | | | | | | | _select_match_* used in process_each_* fns Call _init_processing_handle, _init_selection_handle and _destroy_processing_handle in process_each_* and related functions to set up and destroy handles used while processing items.
* toollib: add init_processing_handle, init_selection_handle and ↵Peter Rajnoha2015-02-102-0/+58
| | | | | | | | | destroy_processing_handle helper functions The init_processing_handle, init_selection_handle and destroy_processing_handle are helper functions that allocate and initialize the handles used when processing items in process_each_* and related functions.
* toollib: pass struct processing_handle to _select_match_* functionsPeter Rajnoha2015-02-102-14/+30
| | | | | | | | | The "struct processing_handle" contains handles to drive the selection/matching so pass it to the _select_match_* functions which are entry points to the selection mechanism used in process_each_* and related functions. This is revised and edited version of former Dave Teigland's patch which provided starting point for all the select support in process_each_* fns.
* report: add report_init_for_selection fn and modify report_object to support ↵Peter Rajnoha2015-02-103-14/+43
| | | | | | | | | | | | | | | | | reporting for selection only The new "report_init_for_selection" is just a wrapper over dm_report_init_with_selection that initializes reporting for selection only. This means we're not going to do the actual reporting to output for display and as such we intialize reporting as if no fields are reported or sorted. The only fields "reported" are taken from the selection criteria string and all such fields are marked as hidden automatically (FLD_HIDDEN flag). These fields are used solely for selection criteria matching. Also, modify existing report_object function that was used for reporting to output for display. Now, it can either cause reporting to output or reporting for selection only. The selection result is stored in struct selection_handle's "selected" variable which can be handled further by any report_object caller.
* toollib: replace void *handle with struct processing_handle for use in ↵Peter Rajnoha2015-02-1022-105/+214
| | | | | | | | | | | | | | | | | | processing functions (process_each_*/process_single_* and related) This patch replaces "void *handle" with "struct processing_handle *handle" in process_each_*, process_single_* and related functions. The struct processing_handle consists of two handles inside now: - the "struct selection_handle *selection_handle" used for applying selection criteria while processing process_each_*, process_single_* and related functions (patches using this logic will follow) - the "void* custom_handle" (this is actually the original handle used before this patch - a pointer to custom data passed into process_each_*, process_single_* and related functions).
* cleanup: make report type condition consistent with the rest of the codePeter Rajnoha2015-02-101-3/+2
| | | | | | It's just more readable this way (each condition resulting in a certain report type is always on one line), just like it's used elsewhere in the code.
* toollib: prepare select_match_{pv,vg,lv} hooksDavid Teigland2015-02-102-6/+59
| | | | | These hooks will check currently processed PV/VG/LV with current selection criteria and the processing continues only if there's a match.
* libdm: report: add dm_report_object_is_selectedPeter Rajnoha2015-02-103-17/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | The new dm_report_object_is_selected fn makes it possible to opt whether the object reported should be displayed on output or not. Also, in addition to that, it makes it possible to save the result of selection (either 0 or 1). So dm_report_object_is_selected is simply more general form of object reporting fn - combinations now allow for: dm_report_object_is_selected(rh, object, 1, NULL): This is exactly the original dm_report_object fn and it's fully equal to it. dm_report_object_is_selected(rh, object, 0, selected): Do not display the result on output, but save info whether the object is selected or not in 'selected' variable. dm_report_object_is_selected(rh, object, 1, selected): Display the result on output (if it passes selection criteria) and save whether the object is selected or not in 'selected' variable. dm_report_object(rh, object, 0, NULL): This combination is not allowed - it will end up with internal error. We're either interested in selection status or we want to display the result on output or both, but never nothing of the two.
* test: Fix a typo in shell/pvmove-restart.sh.Petr Rockai2015-02-101-1/+1
|
* lvm: recognize LVM_COMMAND_PROFILE env var for default command profile to ↵Peter Rajnoha2015-02-093-9/+53
| | | | | | | | | use in LVM commands Once LVM_COMMAND_PROFILE environment variable is specified, the profile referenced is used just like it was specified using "<lvm command> --commandprofile". If both --commandprofile cmd line option and LVM_COMMAND_PROFILE env var is used, the --commandprofile cmd line option gets preference.
* reporter: properly check for _do_info_and_status return value and free the ↵Peter Rajnoha2015-02-091-10/+6
| | | | mempool if created within the fn
* configure: Fix a warning about test/Makefile.in.Petr Rockai2015-02-051-0/+1
|
* NIX: Request {fedora,centos}-release packages explicitly.Petr Rockai2015-02-051-3/+2
|
* NIX: Adjust install_rpms (kernel rpm is now required).Petr Rockai2015-02-051-1/+3
|
* NIX: We need to install lcov for ./configure now as well.Petr Rockai2015-02-051-3/+8
|
* NIX: Move corosynclib-devel & valgrind-devel out of common.Petr Rockai2015-02-051-4/+3
|
* NIX: Allow adding/overriding test configurations.Petr Rockai2015-02-051-9/+12
|
* NIX: Set ulimit -c to unlimited, to get backtraces in logs.Petr Rockai2015-02-051-0/+1
|
* NIX: Add a CentOS 7.0 64b build.Petr Rockai2015-02-051-2/+11
|
* test: Fix a segfault in the test runner.Petr Rockai2015-02-051-2/+3
|
* test: It is not an error for a test daemon to exit before teardown.Petr Rockai2015-02-051-1/+1
|
* test: Remove spurious set -x in lvm-wrapper.Petr Rockai2015-02-051-2/+0
|
* test: Properly detect warnings from testcases.Petr Rockai2015-02-051-2/+19
|
* test: Only force an IO sync when the testcase has finished.Petr Rockai2015-02-051-11/+11
|
* test: Allow a longer timeout for lvextend-snapshot-dmeventd.Petr Rockai2015-02-051-1/+1
|
* test: Make dmsetup remove more robust in pvmove-restart.Petr Rockai2015-02-051-2/+1
|
* test: Make killing local (test) daemons more robust.Petr Rockai2015-02-052-6/+13
|
* test: Disable lvmetad debug log on another bunch of tests.Petr Rockai2015-02-054-1/+13
|
* test: Call $VALGRIND directly in lvm-wrapper.Petr Rockai2015-02-052-2/+2
|
* NIX: Add valgrind-devel to the build environment.Petr Rockai2015-02-051-1/+1
|
* memlock: Do not check memory balance if RUNNING_ON_VALGRIND.Petr Rockai2015-02-051-2/+7
|