]> sourceware.org Git - lvm2.git/commit
libdm: add stats group and region iterators and properties
authorBryn M. Reeves <bmr@redhat.com>
Sun, 19 Jun 2016 12:30:46 +0000 (13:30 +0100)
committerBryn M. Reeves <bmr@redhat.com>
Tue, 5 Jul 2016 18:53:16 +0000 (19:53 +0100)
commitf1f2df7bc0a219afebb86823513516e002a2916f
tree27d87cda74e9519441eaae0a847bb69e04fe97bf
parent62050760aa15e7059ea768b81abcd4d773ed6cab
libdm: add stats group and region iterators and properties

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.
WHATS_NEW_DM
libdm/.exported_symbols.DM_1_02_129
libdm/libdevmapper.h
libdm/libdm-stats.c
This page took 0.042209 seconds and 5 git commands to generate.