summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* doc: document --area, --region, and --group in dmstats.8.indev-bmr-dmstats-groupsBryn M. Reeves2016-07-051-8/+34
|
* dmstats: fix <backtrace> in _display_info_cols()Bryn M. Reeves2016-07-051-2/+2
| | | | | | | Remove a false <backtrace> in _display_info_cols(): it is not an error if there are no regions to display. Fixes commit e6724f03.
* libdm: fix <backtrace> in dm_stats_populateBryn M. Reeves2016-07-051-1/+1
|
* libdm: fix <backtrace> in dm_stats_get_nr_regionsBryn M. Reeves2016-07-051-1/+5
|
* dmstats: rename --auxdata to --userdataBryn M. Reeves2016-07-052-14/+14
|
* dmstats: rename 'aux_data' to 'user_data'Bryn M. Reeves2016-07-052-20/+22
| | | | | | | Make it clear that the "aux data" presented in reports is the user data stored in the field (and does not include any library-internal state such as group descriptors) by renaming the field to user_data and changing the heading to "UserData".
* libdm: clarify library's use of aux_dataBryn M. Reeves2016-07-052-14/+48
| | | | | | | | Make it clear in libdevmapper.h, and in function argument names, that libdm-stats uses the aux_data field internally and that any values set for user_data are appended to the library values before being stored with a region, and similarly, that internal data fields will be stripped prior to returning any previously stored user_data.
* dmstats: replace --statstype with separate object switchesBryn M. Reeves2016-07-051-30/+32
| | | | | | | Replace --statstype=area,region,group with a separate switch for each object type: --area, --region, --group. Omitting any object type switch will use the defaults for the current command (regions and groups for list, and regions, groups and areas for verbose list).
* dmstats: add 'statsname' and 'obj_type' to default stats fieldsBryn M. Reeves2016-07-051-1/+1
|
* dmstats: rename 'type' field to 'obj_type'Bryn M. Reeves2016-07-051-1/+1
| | | | | | Rename the field and remove whitespace from the column heading: "Object Type" -> "ObjType"
* dmstats: use 'statsname' and 'groupid' in default fieldsBryn M. Reeves2016-07-051-1/+1
| | | | | | | Replace the 'name' field with 'statsname' in order to report alias names for groups, and include the 'group_id' field between statsname and the 'region_id' field to make it clear to the user when groups are in use.
* dmstats: convert 'delete' to dm_stats_foreach_region()Bryn M. Reeves2016-07-051-4/+2
|
* dmstats: convert 'print' to dm_stats_foreach_region()Bryn M. Reeves2016-07-051-14/+29
|
* dmstats: convert 'clear' to dm_stats_foreach_region()Bryn M. Reeves2016-07-051-16/+23
|
* doc: update dmstats.8.in for groupsBryn M. Reeves2016-07-052-12/+149
|
* dmstats: fix region deletion messageBryn M. Reeves2016-07-051-1/+1
| | | | | Make the use of 64-bit format macros consistent with other usage and end the message with a '.'.
* dmstats: accept --groupid for 'dmstats delete'Bryn M. Reeves2016-07-051-5/+18
| | | | | Allow deletion of a group and all the regions it contains with a single 'dmstats delete' command.
* dmstats: allow --statstype to override report defultsBryn M. Reeves2016-07-051-1/+1
|
* dmstats: report a list of members as a group's region_idBryn M. Reeves2016-07-051-3/+8
| | | | | Instead of '-' print the member list in range notation (as stored in aux_data).
* dmstats: report groups and region summariesBryn M. Reeves2016-07-051-23/+95
| | | | | | | | | | | | | Walk avaiable groups and regions (in addition to areas) and report aggregate statistics and properties. A new switch is added to filter the type of obects inclued in the report: --statstype={all,area,region,group} The type of the current row is also available in a new DR_STATS_META field 'type'.
* dmstats: do not walk regions if deleting a single idBryn M. Reeves2016-07-051-8/+12
|
* dmstats: add stats_name fieldBryn M. Reeves2016-07-051-0/+14
| | | | | | | To allow the names used to describe statistics report objects to change (for e.g to support groups and region and group aliases) introduce a new "stats_name" field that evaluates to the correct name for the object being reported.
* dmstats: add group alias supportBryn M. Reeves2016-07-051-2/+11
|
* dmstats: add 'group' and 'ungroup' commandsBryn M. Reeves2016-07-051-0/+129
| | | | | | | | | | | | | Add a pair of commands to create and delete stats groups: dmstats group --regions REGIONS dmstats ungroup --groupid ID REGIONS specifies a list of regions to be included in the group. Regions are specified as a comma separated list in order of increasing region ID. Ranges may be specified as a hypen separated pair of values giving the first and last member of the range.
* dmstats: add group_id report field typeBryn M. Reeves2016-07-051-0/+20
|
* libdm: allow deleting regions with dm_stats_delete_group()Bryn M. Reeves2016-07-053-5/+30
| | | | | Add a flag to dm_stats_delete_group() to allow optional deletion of all regions belonging to the group being removed.
* libdm: add stats group and region iterators and propertiesBryn M. Reeves2016-07-054-78/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support do dm_stats_walk*() to walk over the set of available groups using the cursor embedded in the dm_stats handle, and to obtain the type of the object at the current stats cursor location. A set of flags is introduced to control which objects are visited: DM_STATS_WALK_AREA DM_STATS_WALK_REGION DM_STATS_WALK_GROUP DM_STATS_WALK_ALL A final flag suppresses visits to regions that contain only a single area - since the aggregate of such a region is idential to the area it contains this allows these duplicates to be filtered out: DM_STATS_WALK_SKIP_SINGLE_AREA If flags are not initialised before beginning a walk the default set matches the behaviour of previous versions of the library. Also accept group identifiers as immediate arguments to the counter, metric, and property functions by adding control flags to the region and area identifiers passed in. Region and area properties are mapped to their equivalents for the group (for example: group size is reported as the sum of all regions contained in the group). Counter and metric values are aggregated for the region or group.
* libdm: use defined constants for buffer sizesBryn M. Reeves2016-07-051-13/+21
| | | | | | | Introduce constants for the buffer sizes that libdm-stats uses: one for messages sent to the kernel, one for rows of response data returned, and a pair for the "start+len" range and histogram bounds strings.
* libdm: add statistics groupsBryn M. Reeves2016-07-054-14/+953
| | | | | | | | | | | | | | | | | | | | | | | | Add a grouping facility to the libdm-stats library that allows the user to bind several regions together as a group. Groups may be used to aggregate data from several regions for reporting, or to select and sort among large sets of regions. A textual descriptor ("group tag") is associated with each group and is stored in the first group member's aux_data field. The tag contains the group member list and an optional alias for the group, allowing the user to assign meaningful names to groups of regions. These descriptors are parsed in @stats_list message responses and populate the resulting region and area tables with the group structure. Groups with overlapping regions are permitted but since this will result in some events being counted more than once a warning is printed in this case. Nested and overlapping groups are not currently supported and attempting to create these configurations results in error.
* libdm: rename 'region' to 'skip_region' in _stats_walk_nextBryn M. Reeves2016-07-051-4/+3
| | | | | In libdm-stats.c 'region' usually refers to a 'struct region*'. Rename the argument to _stats_walk_start to avoid confusion.
* libdm: add enum based counter and metric callsBryn M. Reeves2016-07-054-222/+396
| | | | | | | | | | | | | | | | | | Add a new enum based interface for accessing counter and metric values that uses a single function for each: uint64_t dm_stats_get_counter(const struct dm_stats *dms, dm_stats_counter_t counter uint64_t region_id, uint64_t area_id); int dm_stats_get_metric(const struct dm_stats *dms, int metric, uint64_t region_id, uint64_t area_id, double *value); This simplifies the implementation of value aggregation for groups of regions. The named function interface now calls the enum interface internally so that all new functionality is available regardless of the method used to retrieve values.
* libdm: cache dm name in stats handleBryn M. Reeves2016-07-051-0/+44
| | | | | | | | Cache the device-mapper name of a bound device in the dm_stats handle. This will be used by stats groups to report a device name or user defined alias for groups.
* libdm: rename dm_stats name, devno and uuid membersBryn M. Reeves2016-07-051-26/+26
| | | | | | | | | | | | | The device-mapper name, device numbers and uuid stored in the dm_stats handle are used only to bind the handle to a specific device in order to issue ioctls. Rename them to "bind_*" to reflect this usage in preparation for caching the device-mapper name of the bound device in the dm_stats handle. This will be used to allow optional aliases to be set for dmstats groups.
* libdm: add dm_bitset_parse_list()Bryn M. Reeves2016-07-054-0/+110
| | | | | | | | | | | | Add a function to parse a list of integer values and ranges into a dm_bitset representation. Individual values signify that that bit is set in the resulting mask and ranges are given as a pair of start and end values, M-N, such that M and N are the first and last members of the range (inclusive). The implementation is based on the kernel's __bitmap_parselist() that is used for cpumasks and other set configuration passed in string form from user space.
* libdm: fix histogram pool user-after-free (CWE-825)Bryn M. Reeves2016-07-051-2/+2
|
* vgsplit: fix moving RAID LVs to split off VG and check for LVs not to skip ↵Heinz Mauelshagen2016-07-051-33/+99
| | | | moving with other LV types
* Merge branch 'master' of ssh://git.fedorahosted.org/git/lvm2Heinz Mauelshagen2016-07-0436-496/+1962
|\
| * tests: using mkfs config fileZdenek Kabelac2016-07-042-14/+30
| | | | | | | | Use more predictable local config when creating ext4.
| * tests: add line for mixing dmeventd with logZdenek Kabelac2016-07-041-0/+1
| | | | | | | | | | | | TODO: it might be better to log dmeventd messages with test output just like we do with clvmd - maybe we will switch to this one instead of extra DMEVENTD log file in future....
| * tests: add mke2fs.confZdenek Kabelac2016-07-042-0/+46
| | | | | | | | | | | | | | | | Add config for mkfs to get more predicatable results when using mkfs across variety of distributions. In future maybe use this per all tests as default. For now user has to specify in a test MKE2FS_CONFIG envvar to use it.
| * tests: try to force remove higher minor firstZdenek Kabelac2016-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | When force removing thin-pool we loose 'real' access to hidden device, and if such pool is in suspended state, any thin volume cannot be dropped. It likely should be also checked by dmsetup, but meanwhile apply simple logic - try to force remove first all higher minors first with assumption we first create thin-pool and then thin volume and there are usually not being released lower dm numbers to get the order wrong.
| * cleanup: drop unused header filesZdenek Kabelac2016-07-042-2/+0
| |
| * dmeventd: improved logged messages from thin pluginZdenek Kabelac2016-07-041-5/+10
| | | | | | | | Show better names in logged messages.
| * dmsetup: fix timestamp leakBryn M. Reeves2016-07-041-4/+8
| | | | | | | | | | | | With a single report (--count=1) no timerfd is set up and the cycle and current timestamps should be freed during the single call to _update_interval_times().
| * dmstats: fix RgStart and RgSize field widthsBryn M. Reeves2016-07-041-2/+2
| |
| * docs: remove obsolete note from dmstats.8.inBryn M. Reeves2016-07-041-5/+0
| |
| * raid0: Add raid0_meta segment type.Alasdair G Kergon2016-07-0110-145/+444
| |
| * lvconvert: improve arg checks in new operation routing codeDavid Teigland2016-07-011-45/+56
| | | | | | | | | | Use defines for segment types, and test args directly instead of indirectly.
| * tests: test foreign users of thin-poolZdenek Kabelac2016-07-011-0/+104
| | | | | | | | | | Note: dmeventd should not need any notification and automatically try to resize again when there is some metadata change.
| * cleanup: warns from older gccZdenek Kabelac2016-07-012-3/+2
| |