1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
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
..
activate locking: Add missing error handling. 2015-06-30 18:54:38 +01:00
cache Add lvmlockd 2015-07-02 15:42:26 -05:00
cache_segtype debug: extra validation of passed segment 2015-05-08 15:15:11 +02:00
commands Add lvmlockd 2015-07-02 15:42:26 -05:00
config Add lvmlockd 2015-07-02 15:42:26 -05:00
datastruct datastruct: Add str_list_add_list. 2015-03-26 18:30:37 +00:00
device cleanup: cast minor to dev_t 2015-05-08 15:15:10 +02:00
display Add lvmlockd 2015-07-02 15:42:26 -05:00
error segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
filters config: use timestamp with nanosecond precision 2015-03-18 13:42:56 +01:00
format1 format1: check for lvm1_system_id 2015-05-08 15:15:10 +02:00
format_pool cache: Store metadata size and checksum. 2015-03-18 23:43:02 +00:00
format_text Add lvmlockd 2015-07-02 15:42:26 -05:00
freeseg segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
label cache: Store metadata size and checksum. 2015-03-18 23:43:02 +00:00
locking lockd: fix stub functions for LV locking 2015-07-02 16:36:04 -05:00
log log: flush stdout before print to stderr 2015-06-19 16:33:20 +02:00
lvmpolld lvmpolld-client.c: debug print when querying progress 2015-05-21 11:20:21 +02:00
metadata Add lvmlockd 2015-07-02 15:42:26 -05:00
mirror cmirror: Adjust region size to work around CPG msg limit to avoid hang. 2015-02-25 14:42:15 -06:00
misc Add lvmlockd 2015-07-02 15:42:26 -05:00
mm xlate: add new variants 2015-06-16 09:30:14 -05:00
properties report: add support for time (basic) 2015-06-30 15:15:10 +02:00
raid segtype: add SEG_ONLY_EXCLUSIVE flag 2014-11-10 22:05:48 +01:00
replicator cleanup: drop default implementation 2014-10-24 16:39:31 +02:00
report report: add infrastructure to recognize fuzzy reserved names and returning dynamic reserved values 2015-07-03 10:47:09 +02:00
snapshot segtype: add SEG_ONLY_EXCLUSIVE flag 2014-11-10 22:05:48 +01:00
striped segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
thin thin: support unaligned size of external origin and thin pool 2015-06-18 18:50:36 +02:00
unknown segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
uuid cleanup: drop unused define 2014-03-12 19:12:34 +01:00
zero cleanup: remove unused headers 2014-11-13 17:49:42 +01:00
Makefile.in Add lvmlockd 2015-07-02 15:42:26 -05:00