1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/libdm
Peter Rajnoha 335707b0e2 report: add infrastructure to recognize fuzzy reserved names and returning dynamic reserved values
With fuzzy names we mean the names for which it's hard or even impossible
to enumerate all possible variations of the name - the name needs to
be evaluated. An example of fuzzy name is a name which has a base
(substring) which matches and it can contain arbitrary variations
around this base. We can cover human language better with fuzzy
names as people may use several different names (or sentences) to
denote the same thing.

With dynamic values we mean the values which are not constants
and they need to be evaluated in runtime. An example of dynamic
value is a value which depends on current system state (e.g. time,
current configuration or any other state which may change and it
needs runtime evaluation).

There's a handler that can be registered with reporting/selection
using dm_report_reserved_handler instance. This is a central point
in which the computation/evaluation happens when processing reserved
values. Currently, there are two actions declared:

  DM_REPORT_RESERVED_PARSE_FUZZY_NAME
  (translates fuzzy name into canonical name)

  DM_REPORT_RESERVED_GET_DYNAMIC_VALUE
  (gets value for canonical name)

The handler is then registered as value in struct
dm_report_reserved_value (see explaining comments besided
the struct dm_report_reserved_value in libdevmapper.h).

Also, this patch provides support for simple caching of values
used during report/selection via dm_report_value_cache_{set,get}.
This is supposed to be used mainly in the dm_report_reserved_handler
instances to save values among calls so all the handler calls work
with the same base value used in computation/evaluation and/or
possibly to save resources if the evaluation is more time-consuming.
The cache is attached to the dm_report handle and so the cache is
dropped one dm_report is dropped.
2015-07-03 10:47:09 +02:00
..
datastruct Use void pointer instead of char for binary key 2011-03-10 12:48:40 +00:00
ioctl libdm: Add dm_task_get_errno to return ioctl errno. 2015-05-26 15:13:49 +01:00
misc libdm: Add DM_INTERNAL_SUSPEND_FLAG. 2015-04-23 18:39:04 +01:00
mm cleanup: indents comments backtraces 2014-11-10 22:05:49 +01:00
regex cleanup: add braces for if() 2014-07-02 10:45:43 +02:00
.exported_symbols libdm: new dm_task_get_info with internal_suspend 2015-05-15 16:48:22 +02:00
.exported_symbols.Base libdm: new dm_task_get_info with internal_suspend 2015-05-15 16:48:22 +02:00
.exported_symbols.DM_1_02_97 libdm: new dm_task_get_info with internal_suspend 2015-05-15 16:48:22 +02:00
.exported_symbols.DM_1_02_98 libdm: Add dm_task_get_errno to return ioctl errno. 2015-05-26 15:13:49 +01:00
.exported_symbols.DM_1_02_99 libdm: add dm_tree_node_set_thin_pool_read_only 2015-06-18 15:15:39 +02:00
.exported_symbols.DM_1_02_100 config: add support for config value formatting flags 2015-06-24 11:13:37 +02:00
.exported_symbols.DM_1_02_101 report: add infrastructure to recognize fuzzy reserved names and returning dynamic reserved values 2015-07-03 10:47:09 +02:00
libdevmapper.h report: add infrastructure to recognize fuzzy reserved names and returning dynamic reserved values 2015-07-03 10:47:09 +02:00
libdevmapper.pc.in Switch to use Requires.private for devmapper.pc and lvm2app.pc 2010-05-11 08:54:11 +00:00
libdm-common.c libdm-common.c: remove trailing whitespace 2015-05-12 17:16:49 +02:00
libdm-common.h libdm: introduce and use DEV_UUID macro 2012-10-10 17:16:15 +02:00
libdm-config.c config: also clone associated id when cloning node using dm_config_clone_node{_with_mem} 2015-06-25 10:21:07 +02:00
libdm-deptree.c libdm: enhance tracing messages 2015-07-01 13:44:28 +02:00
libdm-file.c debug: show sys errors 2015-05-08 15:15:10 +02:00
libdm-report.c report: add infrastructure to recognize fuzzy reserved names and returning dynamic reserved values 2015-07-03 10:47:09 +02:00
libdm-string.c cleanup: libdm simplier error comparation 2014-07-02 10:45:42 +02:00
Makefile.in makefiles: better clean 2015-05-18 12:45:42 +02:00