1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Peter Rajnoha 2f7f6932dc report: selection: fix selection criteria to not match reserved values when using >, <, >=, <
Some values are reserved for special purpose like 'undefined', 'unmanaged' etc.
When using >, <, >= and < comparison operators where the range is considered,
do not include reserved values as proper values in this range which
would otherwise result in not so obvious criteria match (as the reserved value is
actually transparent for the user). It's incorrect.

Example scenario:
$ vgs -o vg_name,vg_mda_copies vg1 vg2
  VG   #VMdaCps
  vg1          1
  vg2  unmanaged

The "unmanaged" is actually mapped onto reserved value
18446744073709551615 (2^64 - 1) internally.

Such reseved value is already caught on selection criteria input
properly:

$ vgs -o name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies=18446744073709551615'
  Numeric value 18446744073709551615 found in selection is reserved.

However, we still need to fix situaton where the reserved value may be
included in resulting range:

Before this patch:
$ vgs -o vg_name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies >= 1'
  VG   #VMdaCps
  vg1          1
  vg2  unmanaged

With this patch applied:
$ vgs -o vg_name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies >= 1'
  VG   #VMdaCps
  vg1         1

From the examples above, we can see that without this patch applied,
the vg_mda_copies >= 1 also matched the reserved value 18446744073709551615
(which is represented by the "unamanged" string on report). When
applying the operators, such values must be skipped! They're meant to
be matched only against their string representation only, e.g.:

$ vgs -o name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies=unmanaged'
  VG   #VMdaCps
  vg2  unmanaged

...or any synonyms:

$ vgs -o name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies=undefined'
  VG   #VMdaCps
  vg2  unmanaged
2014-10-27 11:25:08 +01:00
autoconf autoconf: Update config.guess/sub to 2014-01-01. 2014-01-21 22:00:15 +00:00
conf cache: include cache mode in vg metadata and display 2014-10-02 11:17:41 -05:00
daemons metadata: Use flags to control warnings. 2014-10-07 01:15:43 +01: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 pools: workaround hints 2014-10-26 19:45:17 +01:00
libdaemon va_list: properly pass va_list through functions 2014-09-16 11:42:40 +02:00
libdm report: selection: fix selection criteria to not match reserved values when using >, <, >=, < 2014-10-27 11:25:08 +01:00
liblvm lvm2app: update to new lv_create_single API 2014-10-26 18:37:13 +01:00
man man: lvconvert/create updates 2014-10-24 16:39:32 +02:00
nix NIX: Fix 32b builds (2G of RAM is 1M too much for 32b QEMU). 2014-10-22 09:03:26 +02:00
old-tests report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
po make: Fix pofile and .d file generation. 2014-07-02 00:48:50 +01:00
python lvm2app: update to new lv_create_single API 2014-10-26 18:37:13 +01: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: remove workaround for lvm2-monitor.service's ExecStop line 2014-10-14 10:08:23 +02:00
spec spec: new thin-generic.profile 2014-06-13 10:01:34 +02:00
test pools: workaround hints 2014-10-26 19:45:17 +01:00
tools cache: support more args 2014-10-26 18:37:13 +01: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 cache: Enable cache segment type by default. 2014-09-17 23:13:15 +01:00
configure.in cache: Enable cache segment type by default. 2014-09-17 23:13:15 +01: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 makefiles: fix linking of PIE code 2014-09-18 18:14: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-09-01 01:53:44 +01:00
VERSION_DM post-release 2014-09-01 01:53:44 +01:00
WHATS_NEW man: lvconvert/create updates 2014-10-24 16:39:32 +02:00
WHATS_NEW_DM report: selection: fix selection criteria to not match reserved values when using >, <, >=, < 2014-10-27 11:25:08 +01: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.