1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

757 Commits

Author SHA1 Message Date
Alasdair G Kergon
99c443facc post-release 2015-01-30 16:18:43 +00:00
Alasdair G Kergon
d0837dcceb pre-release 2015-01-30 16:16:51 +00:00
Alasdair G Kergon
57f67ce855 post-release 2015-01-21 13:25:10 +00:00
Alasdair G Kergon
fa01faaa4a pre-release 2015-01-21 13:08:12 +00:00
Alasdair G Kergon
25d906dbde dmeventd: Reduce waitevent EINTR message severity. 2015-01-21 12:54:00 +00:00
Alasdair G Kergon
7cfc9a4f64 libdevmapper: Improve incompatible version msg. 2015-01-21 12:23:56 +00:00
Zdenek Kabelac
2908ab3eed thin: errrorwhenfull support
Support error_if_no_space feature for thin pools.
Report more info about thinpool status:
(out_of_data (D), metadata_read_only (M), failed  (F) also as health
attribute.)
2015-01-14 14:52:05 +01:00
Peter Rajnoha
5378a1a63e WHATS_NEW: f94f846 actually fixes DM issue, not LVM issue 2014-12-09 10:52:07 +01:00
Peter Rajnoha
5edf6a56c4 libdm: report: add dm_report_compact_fields
Add new dm_report_compact_fields function to cause report outout
(dm_report_output) to ignore fields which don't have any value set
in any of the rows reported. This provides support for compact report
output where only fields which have something to report are displayed.
2014-12-05 12:00:28 +01:00
Peter Rajnoha
44394cd246 libdm: remove unimplemented dm_report_set_output_selection fn
The dm_report_set_output_selection was not implemented in the end -
we have dm_report_init_with_selection instead. This is just a remnant
from development code that got into libdevmapper.h by mistake.
2014-12-05 11:54:25 +01:00
Alasdair G Kergon
9258e57a50 post-release 2014-11-28 23:07:31 +00:00
Alasdair G Kergon
e492861749 pre-release 2014-11-28 23:06:07 +00:00
Alasdair G Kergon
cd3b6070aa post-release 2014-11-24 17:48:25 +00:00
Alasdair G Kergon
2aca834724 pre-release 2014-11-24 17:46:50 +00:00
Petr Rockai
14472d62ba Update WHATS_NEW. 2014-11-23 23:30:27 +01:00
Zdenek Kabelac
fc935495c8 libdm: fix reporting of empty string list
Don't write behind the allocated array when list is empty.
Use index 0 for the allocated element.

Error triggered by i.e.:  lvs -a -o all,lv_modules
2014-11-22 18:50:53 +01:00
Stéphane Aulery
112302d41a man: fix (\+) syntax warning of Groff
Signed-off-by: Stéphane Aulery <saulery@free.fr>
2014-11-12 09:39:19 +01:00
Alasdair G Kergon
131aaeb634 post-release 2014-11-11 14:15:32 +00:00
Alasdair G Kergon
9a5910bdf9 pre-release 2014-11-11 14:13:00 +00:00
Zdenek Kabelac
824019531c libdm: tunning cache API
Support new PASSTHROUGH 'feature' flag.

Add dm_config_node to pass in policy args.

Really use origin_uuid instead of using extra call
to pass seg_areas.

Switch to 64bit feature flag bit set so there is
enough space in future for new bits...
2014-11-10 22:05:48 +01:00
Zdenek Kabelac
89233544e0 libdm: allow to activate any pool with tid == 0
When transaction_id is set 0 for thin-pool, libdm avoids validation
of thin-pool, unless there are real messages to be send to thin-pool.
This relaxes strict policy which always required to know
in front transaction_id for the kernel target.

It now allows to activate thin-pool with any transaction_id
(when transaction_id is passed in)

It is now upto application to validate transaction_id from life
thin-pool volume with transaction_id within it's own metadata.
2014-11-04 15:28:00 +01:00
Zdenek Kabelac
ed2a0560ad libdm: init char array
When non-root uses dm_check_version() it's been printing some unit
values from stack. So always init those vars.
2014-11-03 14:19:31 +01:00
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
Zdenek Kabelac
482e572e5d libdm: add DM_LIST_HEAD_INIT macro
Support to initialize dm_list struct members.
2014-10-24 16:39:31 +02:00
Peter Rajnoha
5895657b59 libdm: fix dm_is_dm_major to not issue error about missing /proc lines for dm module.
This is probably better approach than 3880ca5eca.

If dm module is not loaded during dm_is_dm_major call, there are no
lines for dm in /proc/devices, of course. Normally, dm_is_dm_major
is called to check existing devices, hence if module is not loaded,
we can expect there's no DM device present at the same time so we
can directly return 0 here (meaning the major number being inspected
is not dm device's one).

See also https://bugzilla.redhat.com/show_bug.cgi?id=1059711.
2014-09-12 15:28:51 +02:00
Peter Rajnoha
25ae9383bb revert: commit 3880ca5eca
There's a better solution to this...
2014-09-12 15:28:51 +02:00
Peter Rajnoha
3880ca5eca libdm: use dm-mod autoloading during dm_is_dm_major call if needed
For dm_is_dm_major to determine whether the major number given as
an argument belongs to a DM device, libdm code needs to know what
the actual DM major is to do the comparison.

It may happen that the dm-mod module is not loaded during this
call and so for the completness let's try our best before we start
giving various errors - we can still make use of dm-mod autoloading,
though only since kernels 2.6.36 where this feature was introduced.
2014-09-12 12:49:37 +02:00
Alasdair G Kergon
b25e0086b6 post-release 2014-09-01 01:53:44 +01:00
Alasdair G Kergon
fcb433abec pre-release 2014-09-01 01:51:47 +01:00
Zdenek Kabelac
91a453de05 WHATS_NEW_DM 2014-08-29 13:10:19 +02:00
Alasdair G Kergon
dd9700f192 post-release 2014-08-26 16:41:18 +01:00
Alasdair G Kergon
8b8d21f873 pre-release 2014-08-26 16:34:14 +01:00
Zdenek Kabelac
8f518cf197 libdm: add check transaction_id after message
Add extra safety detection for thin pool transaction id
and query pool status after confirmed message.

In case there is a missmatch, immeditelly abort further
processing.
2014-08-26 14:12:20 +02:00
Peter Rajnoha
02dc3c773e report: add dm_report_field_string_list_unsorted 2014-08-25 16:11:40 +02:00
Alasdair G Kergon
42e07d2bce dmsetup: Support remove --deferred.
This patch adds a new flag --deferred to dmsetup remove. If this flag is
specified and the device is open, it is scheduled to be deleted on
close.

struct dm_info is extended.

The existing dm_task_get_info() is converted into a wrapper around the
new version dm_task_get_info_with_deferred_remove() so existing binaries
can still use the old smaller structure.

Recompiled code will pick up the new larger structure.

From: Mikulas Patocka <mpatocka@redhat.com>
2014-08-16 00:34:48 +01:00
Alasdair G Kergon
8a7682cbc9 libdm: Add DM_DEFERRED_REMOVE to dm-ioctl.h. 2014-08-15 13:45:55 +01:00
Peter Rajnoha
fa793bed64 select: add support for selection to match string list subset, recognize { } operator
Using "[ ]" operator together with "&&" (or ",") inside causes the
string list to be matched if and only if all the items given match
the value reported and the number of items also match. This is
strict list matching and the original behaviour we already have.

In contrast to that, the new "{ }" operator together with "&&" inside
causes the string list to be matched if and only if all the items given
match the value reported but the number of items don't need to match.
So we can provide a subset in selection criteria and if the subset
is found, it matches.

For example:

$ lvs -o name,tags
  LV    LV Tags
  lvol0 a
  lvol1 a,b
  lvol2 b,c,x
  lvol3 a,b,y

$ lvs -o name,tags -S 'tags=[a,b]'
  LV    LV Tags
  lvol1 a,b

$ lvs -o name,tags -S 'tags={a,b}'
  LV    LV Tags
  lvol1 a,b
  lvol3 a,b,y

So in the example above the a,b is subset of a,b,y and therefore
it also matches.

Clearly, when using "||" (or "#") inside, the { } and [ ] is the
same:

$ lvs -o name,tags -S 'tags=[a#b]'
  LV    LV Tags
  lvol0 a
  lvol1 a,b
  lvol2 b,c,x
  lvol3 a,b,y

$ lvs -o name,tags -S 'tags={a#b}'
  LV    LV Tags
  lvol0 a
  lvol1 a,b
  lvol2 b,c,x
  lvol3 a,b,y

Also in addition to the above feature, fix list with single value
matching when using [ ]:

Before this patch:
$ lvs -o name,tags -S 'tags=[a]'
  LV    LV Tags
  lvol0 a
  lvol1 a,b
  lvol3 a,b,y

With this patch applied:
$ lvs -o name,tags -S 'tags=[a]'
  LV    LV Tags
  lvol0 a

In case neither [] or {} is used, assume {} (the behaviour is not
changed here):

$ lvs -o name,tags -S 'tags=a'
  LV    LV Tags
  lvol0 a
  lvol1 a,b
  lvol3 a,b,y

So in new terms 'tags=a' is equal to 'tags={a}'.
2014-08-13 16:10:12 +02:00
Peter Rajnoha
6dd98c1fa8 select: fix string list selection to match whole words only but not prefixes of searched string
$ lvs -o name,tags vg/lvol0
  LV    LV Tags
  lvol0 a

Before this patch:

$ lvs -o name,tags vg/lvol0 -S 'tags=[a]'
  LV    LV Tags
  lvol0 a

$ lvs -o name,tags vg/lvol0 -S 'tags=[ab]'
  LV    LV Tags
  lvol0 a
(incorrect!)

$ lvs -o name,tags vg/lvol0 -S 'tags=[abc]'
  LV    LV Tags
  lvol0 a
(incorrect!)

With this patch applied:

$ lvs -o name,tags vg/lvol0 -S 'tags=[a]'
  LV    LV Tags
  lvol0 a

$ lvs -o name,tags vg/lvol0 -S 'tags=[ab]'
(no result - correct!)

$ lvs -o name,tags vg/lvol0 -S 'tags=[abc]'
(no result - correct!)
2014-08-13 16:04:02 +02:00
Alasdair G Kergon
26885ea119 post-release 2014-08-05 02:12:20 +01:00
Alasdair G Kergon
9d4e1e51a9 pre-release 2014-08-05 02:07:35 +01:00
Alasdair G Kergon
7cff640d9a activation: Fix upgrades using uuid suffixes.
2.02.106 added suffixes to some LV uuids in the kernel.

If any of these LVs is activated with 2.02.105 or earlier,
and then a later version is used, the LVs appear invisible and
activation commands fail.

The code now has to check the kernel for both old and new uuids.
2014-07-30 21:55:11 +01:00
Alasdair G Kergon
321bed7137 post-release 2014-07-23 16:23:52 +01:00
Alasdair G Kergon
25fa725b05 pre-release 2014-07-23 16:05:22 +01:00
Peter Rajnoha
e38af4e28f libdm: report: fix string list internal representation if delimiter is composed of more than one char 2014-07-10 16:18:05 +02:00
Peter Rajnoha
4b65d7ec72 WHATS_NEW: commits a473435..7021c8f1 2014-07-07 16:52:43 +02:00
Alasdair G Kergon
29ca0573ba post-release 2014-06-23 15:23:09 +01:00
Alasdair G Kergon
0bb6ffb81f pre-release 2014-06-23 14:16:39 +01:00
Alasdair G Kergon
8d27f8e003 pre-release 2014-06-23 14:03:32 +01:00
Peter Rajnoha
a40bc36b2e libdevmapper: revoke commit 7c86131233
We have "help" and "?" defined as implicit fields now. As such, we
don't need to export these names in libdevmapper (as it was introduced
by commit 7c86131233 within this release).
If anyone uses these field names by mistake, the libdevmapper code can
error out correctly if it detects that the set of explicit field names
(the ones supplied by "fields" arg in dm_report_init/dm_report_init_with_selection)
contains any of the implicit field names (the ones defined internally
by libdevmapper itself).
2014-06-19 16:09:32 +02:00
Peter Rajnoha
cd7325f18d report: make "help" and "?" field implicit
Making "help" and "?" implicit also simplifies code since the
dm_report_init caller (lvm/dmsetup) doesn't need to check on
dm_report_init return whether "help" or "?" was hit while parsing
fields/sort keys in libdevmapper.

The libdevmapper now sets internal "RH_ALREADY_REPORTED" flag
after it reports the "help" or "?" implicit field. Then libdevmapper
itself checks for this flag in dm_report_object and if found,
the actual reporting is skipped (because the "help" implicit field
was reported instead of the actual report).
2014-06-19 16:09:31 +02:00