1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Peter Rajnoha 35c4e4489c report: select: add support for reserved value recognition in report selection string - add struct dm_report_reserved_value
Make dm_report_init_with_selection to accept an argument with an
array of reserved values where each element contains a triple:

  {dm report field type, reserved value, array of strings representing this value}

When the selection is parsed, we always check whether a string
representation of some reserved value is not hit and if it is,
we use the reserved value assigned for this string instead of
trying to parse it as a value of certain field type.

This makes it possible to define selections like:

   ... --select lv_major=undefined (or -1 or unknown or undef or whatever string representations are registered for this reserved value in the future)
   ... --select lv_read_ahead=auto
   ... --select vg_mda_copies=unmanaged

With this, each time the field value of certain type is hit
and when we compare it with the selection, we use the proper
value for comparison.

For now, register these reserved values that are used at the moment
(also more descriptive names are used for the values):

  const uint64_t _reserved_number_undef_64 = UINT64_MAX;
  const uint64_t _reserved_number_unmanaged_64 = UINT64_MAX - 1;
  const uint64_t _reserved_size_auto_64 = UINT64_MAX;

 {
  {DM_REPORT_FIELD_TYPE_NUMBER, _reserved_number_undef_64, {"-1", "undefined", "undef", "unknown", NULL}},
  {DM_REPORT_FIELD_TYPE_NUMBER, _reserved_number_unmanaged_64, {"unmanaged", NULL}},
  {DM_REPORT_FIELD_TYPE_SIZE, _reserved_size_auto_64, {"auto", NULL}},
  NULL
 }

Same reserved value of different field types do not collide.
All arrays are null-terminated.

The list of reserved values is automatically displayed within
selection help output:

  Selection operands
  ------------------
  ...

  Reserved values
  ---------------
    -1, undefined, undef, unknown   - Reserved value for undefined numeric value. [number]
    unmanaged                       - Reserved value for unmanaged number of metadata copies in VG. [number]
    auto                            - Reserved value for size that is automatically calculated. [size]

  Selection operators
  -------------------
  ...
2014-06-17 16:27:21 +02:00
autoconf autoconf: Update config.guess/sub to 2014-01-01. 2014-01-21 22:00:15 +00:00
conf profile: add thin-generic.profile 2014-06-13 09:56:29 +02:00
daemons report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
doc conf: add separate 'conf' dir for config files 2013-07-02 15:22:11 +02:00
include report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
lib report: select: add support for reserved value recognition in report selection string - add struct dm_report_reserved_value 2014-06-17 16:27:21 +02:00
libdaemon libdaemon: Keep track of client threads, wait before shutdown. 2014-06-09 01:50:57 +02:00
libdm report: select: add support for reserved value recognition in report selection string - add struct dm_report_reserved_value 2014-06-17 16:27:21 +02:00
liblvm report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
man snapshot: %ORIGIN is relative to data size 2014-06-17 13:41:01 +02:00
nix NIX: Use VM images with the correct root module list. 2014-04-26 13:46:25 +02:00
old-tests report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
po INSTALL rules updates 2010-04-09 21:42:48 +00:00
python compilation: Rename tags variables to tagsl. 2014-01-30 21:09:28 +00:00
report-generators add copyright notices to new files 2010-07-28 12:20:38 +00:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket 2014-06-13 15:45:25 +02:00
spec spec: new thin-generic.profile 2014-06-13 10:01:34 +02:00
test tests: check new snapshot skills 2014-06-17 13:43:05 +02:00
tools report: select: add support for reserved value recognition in report selection string - add struct dm_report_reserved_value 2014-06-17 16:27:21 +02:00
udev makefiles: compile files on make 2014-04-18 16:38:49 +02:00
unit-tests cleanup: use DM_ARRAY_SIZE 2014-04-08 11:00:15 +02:00
.gitignore gitignore: Ignore files ending in ~ 2012-06-11 16:13:02 +01:00
acinclude.m4 configure: also LDFLAGS, not LDLAGS for proper restore 2013-12-04 15:00:56 +01:00
aclocal.m4 man: minor fixes in lvmetad man page 2014-04-23 14:34:42 +02:00
configure configure: update libcpg test 2014-06-06 10:31:45 +02:00
configure.in configure: update libcpg test 2014-06-06 10:31:45 +02:00
COPYING Outline docs 2001-12-31 16:12:40 +00:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in man: document DM_DEFAULT_NAME_MANGLING_MODE 2014-06-05 17:47:21 +02:00
Makefile.in makefiles: wait till include is populated 2014-04-18 16:38:48 +02:00
README Rename git report from LVM2.git to lvm2.git. 2012-06-08 17:41:43 +01:00
VERSION post-release 2014-04-10 17:13:27 +01:00
VERSION_DM post-release 2014-04-10 17:13:27 +01:00
WHATS_NEW snapshot: %ORIGIN is relative to data size 2014-06-17 13:41:01 +02:00
WHATS_NEW_DM systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket 2014-06-13 15:45:25 +02:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sources.redhat.com/pub/lvm2/

The source code is stored in git:
  http://git.fedorahosted.org/git/lvm2.git
  git clone git://git.fedorahosted.org/git/lvm2.git

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing lists for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

  lvm2-commits@lists.fedorahosted.org (Read-only archive of commits)
  Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel

The source code repository used until 7th June 2012 is accessible here:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.