master - libdm: add enum based counter and metric calls
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9420f8248582fb38afd662131aa28bec22793705 Commit: 9420f8248582fb38afd662131aa28bec22793705 Parent: f6a999b4371d506a5daa306dd6ae65e5bde8828a Author: Bryn M. Reeves <[email protected]> AuthorDate: Mon Feb 29 17:33:16 2016 +0000 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Tue Jul 5 19:29:50 2016 +0100
libdm: add enum based counter and metric calls
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.
--- WHATS_NEW_DM | 1 + libdm/.exported_symbols.DM_1_02_129 | 2 + libdm/libdevmapper.h | 48 +++ libdm/libdm-stats.c | 567 +++++++++++++++++++++-------------- 4 files changed, 396 insertions(+), 222 deletions(-)
WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@ Version 1.02.129 - ================================= + Add enum-driven dm_stats_get_{metric,counter}() interfaces. Add dm_bitset_parse_list() to parse a string representation of a bitset. Thin dmeventd plugin umounts lvm2 volume only when pool is 95% or more.
libdm/.exported_symbols.DM_1_02_129 +2 -0
@@ -1 +1,3 @@ dm_bitset_parse_list +dm_stats_get_counter +dm_stats_get_metric
libdm/libdevmapper.h +48 -0
66 lines not on this page · raw message
libdm/libdm-stats.c +345 -222
687 lines not on this page · raw message