1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-01 09:47:48 +03:00

974 Commits

Author SHA1 Message Date
Heinz Mauelshagen
aecd3499b2 raid_manip,lv_manip:
lv_manip/raid_manip: optimize uspace metadata device wiping
report: display RAID data_offset per image LV with -a output rather than with the top-level lv

comments
2015-11-30 22:19:38 +01:00
Heinz Mauelshagen
0b089560e1 raid_manip: allow for multiple sublvs in conversation duplication 2015-10-01 23:45:27 +02:00
Heinz Mauelshagen
87cd22469e raid_manip: more raid01 support 2015-09-14 22:08:45 +02:00
Heinz Mauelshagen
51b69eb35a dev_manager: introduce _seg_len() to cope with reshape_len
raid_manip: fix lv_raid_split() regression and support splitting multiple images as another raid1 mirror
2015-09-10 16:11:23 +02:00
Heinz Mauelshagen
cabcd26903 lv_manip/raid_manip: move raid segment reordering for raid10 far across to raid_manip
move rimage extent calculation across to raid_manip
2015-09-09 00:57:35 +02:00
Heinz Mauelshagen
3e9da6cf66 libdm-deptree: fixup raid10_near target 2015-09-08 20:38:38 +02:00
Heinz Mauelshagen
ccb3bbcc25 More raid10_{far,offset} support 2015-09-01 11:21:19 +02:00
Heinz Mauelshagen
f67093e415 Merge with master 23770214a9ac 2015-08-20 18:56:12 +02:00
Heinz Mauelshagen
2621f3da87 Merge with master 9c5a85ce249f6 2015-08-20 18:31:28 +02:00
Heinz Mauelshagen
ee4df99b36 fluff 2015-08-18 11:59:32 +02:00
Heinz Mauelshagen
4e3489c4cd merged more fixes from raid0 striped cli flaws 2015-08-05 15:55:26 +02:00
Heinz Mauelshagen
a5d0bde0bf merged fixes from raid0 striped cli flaws 2015-07-30 12:15:35 +02:00
Heinz Mauelshagen
1a5bef1baa lv_manip: add definition of mirrors for type raid1
raid_manip: clean up linear conversion by intriducing area check function
2015-07-22 19:18:16 +02:00
Heinz Mauelshagen
928c7ecd52 adjustments derived from raid0 upstream backport
raid_manip: support image count change during conversion between mirror and raid1
2015-06-11 02:56:10 +02:00
Heinz Mauelshagen
0111df15eb Merge branch 'master' into test
Conflicts:
	lib/config/config_settings.h
	lib/metadata/lv_manip.c
	lib/metadata/metadata-exported.h
	lib/metadata/pv_map.c
	lib/metadata/raid_manip.c
	lib/metadata/segtype.h
2015-06-08 15:10:09 +02:00
Heinz Mauelshagen
ea10a99304 raid_manip: rework _adjust_segtype() to _possible_segtype() using segment_type flag to compare; rename dm_status_raid members from *region to *sectors comments 2015-05-26 20:39:44 +02:00
Alasdair G Kergon
eeb498627c libdm: Add dm_task_get_errno to return ioctl errno.
There are reports of unexplained ioctl failures when using dmeventd.
An explanation might be that the wrong value of errno is being used.

Change libdevmapper to store an errno set by from dm ioctl() directly
and provide it to the caller through a new dm_task_get_errno() function.

[Replaced f9510548667754d9209b232348ccd2d806c0f1d8]
2015-05-26 15:13:49 +01:00
Heinz Mauelshagen
ab343a35b5 avoid dev_sectors 8th raid status field in favour of status->total_regions, which holds the number of sectors per raid device 2015-05-21 19:20:30 +02:00
Heinz Mauelshagen
68855d2473 make PFL*() macros conditional 2015-05-21 18:41:37 +02:00
Heinz Mauelshagen
a761ddb772 remove superfluous raid5_0 and raid6_0_6 mappings; support -m with linear <-> raid4/5 2015-05-20 22:58:39 +02:00
Heinz Mauelshagen
08ab60d979 raid_manip: rework reshape space allocation 2015-05-20 20:46:00 +02:00
Zdenek Kabelac
30c3bbcd9e makefiles: better clean
More exact clean of library exported symbols files.

Also use $(firstword) test to check for empty string
so 'make clean' has now cleaner condensed look.

Clean also created include links.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
fe00b163d6 configure: move DEFS to configure.h 2015-05-18 12:43:25 +02:00
Zdenek Kabelac
797c18d543 libdm: new dm_task_get_info with internal_suspend
Introduce new implmentation of dm_task_get_info() function
with support for reading internal_suspend.
.
This time it is done in a 'versioned' way.

We keep the old fashion dm_task_get_info(Base) to implement
the old behavior of 1.02.95 libdm code.

libdm version 1.02.96 introduced 'macro' wrapper
dm_task_get_info_with_deferred_remove with new implementation
of dm_task_get_info() - we cannot do anything else then to
provide compatible version of this symbol.

Now in version 1.02.97 we add new versioned implementation of
dm_task_get_info(DM_1_02_97) symbol.

This has the effect that i.e. rpm build will finaly resolve proper
dependency on a new symbol - so it will be no longer possible,
to build a new binary and use old library
(rpm -q --provides will show libdevmapper.so.1.02(DM_1_02_97)(64bit))

Also the history is now tracked. If a new function is added (or
reimplemented), it needs to be placed in proper file,
so it could be exported with right versioning symbol.
File .exported_symbols.Base should and any existing older DM
should be treated as read-only after a release.

Also - only libdm has been currently enhanced with versioned .Base
file, as soon as other libs (liblvm, libdevmapper-event) needs changes
they should also get their exported symbol files - meanwhile
make.tmpl handles both cases.
2015-05-15 16:48:22 +02:00
Zdenek Kabelac
a2c9ede6b3 makefiles: assign vars before include
Before we include, set INCLUDE and TARGETS.
Extend CFLAGS after include.
2015-05-14 00:19:33 +02:00
Heinz Mauelshagen
67af830020 out of place reshape starts to work 2015-05-13 23:48:53 +02:00
Heinz Mauelshagen
431e519040 raid_manip: enhance _lv_allocate_reshape_space(): wgetting closer to support out of place reshaping; conform to seg->reshape_len on activation; comments 2015-05-12 17:47:18 +02:00
Ondrej Kozina
257f7febc7 libdm-common.c: remove trailing whitespace 2015-05-12 17:16:49 +02:00
Zdenek Kabelac
eadebc3b61 debug: show sys errors 2015-05-08 15:15:10 +02:00
Zdenek Kabelac
5232fd13f3 cleanup: cast minor to dev_t
Let the arithmetic run with a single dev_t type (Coverity).
2015-05-08 15:15:10 +02:00
Zdenek Kabelac
b8dfd7a53d cleanup: indent mismatch
Aling break (Coverity).
2015-05-08 15:15:10 +02:00
Heinz Mauelshagen
058b2b07c8 raid_manip: better raid0 <-> raid10 sort, fix unset stripe_size, fix raid0 <-> raid4 conversion not working | libdm-deptree: supprt for up to 256 raid devices 2015-05-08 15:09:22 +02:00
Heinz Mauelshagen
3bb11ffbf0 raid_manip: support linear <-> raid1 via lv_raid_convert(); introduce lv_segment_area.u.lv.reshape_le and seg_reshape_le() for out-of-place reshape support; comments 2015-04-28 22:20:02 +02:00
Peter Rajnoha
82f6dbfaf7 select: fix matching reserved values while <,<=,>,>= is used in selection criteria
Scenario:

$ vgs -o+vg_mda_copies
  VG     #PV #LV #SN Attr   VSize VFree #VMdaCps
  fedora   1   2   0 wz--n- 9.51g    0  unmanaged
  vg      16   9   0 wz--n- 1.94g 1.83g         2

$ lvs -o+read_ahead vg/lvol6 vg/lvol7
  LV    VG   Attr       LSize Pool Origin Data%  Rahead
  lvol6 vg   Vwi-a-tz-- 1.00g pool lvol5  0.00      auto
  lvol7 vg   Vwi---tz-k 1.00g pool lvol6         256.00k

Before this patch:

$vgs -o vg_name,vg_mda_copies -S 'vg_mda_copies < unmanaged'
  VG   #VMdaCps
  vg          2

Problem:
Reserved values can be only used with exact match = or !=, not <,<=,>,>=.
In the example above, the "unamanaged" is internally represented as
18446744073709551615, but this should be ignored while not comparing
field directly with "unmanaged" reserved name with = or !=. Users
should not be aware of this internal mapping of the reserved value
name to its internal value and hence it doesn't make sense for such
reserved value to take place in results of <,<=,> and >=.
There's no order defined for reserved values!!! It's a special
*reserved* value that is taken out of the usual value range
of that type.

This is very similar to what we have already fixed with
2f7f6932dcd450ba75fe590aba8c09838d2618dc, but it's the other way round
now - we're using reserved value name in selection criteria now
(in the patch 2f7f693, we had concrete value and we compared it
with the reserved value). So this patch completes patch 2f7f693.

This patch also fixes this problem:

$ lvs -o+read_ahead vg/lvol6 vg/lvol7 -S 'read_ahead > 32k'
  LV    VG   Attr       LSize Pool Origin Data%  Rahead
  lvol6 vg   Vwi-a-tz-- 1.00g pool lvol5  0.00      auto
  lvol7 vg   Vwi---tz-k 1.00g pool lvol6         256.00k

Problem:
In the example above, the internal reserved value "auto" is in the
range of selection "> 32k" - it shouldn't match as well. Here the
"auto" is internally represented as MAX_DBL and of course, numerically,
MAX_DBL > 256k. But for users, the reserved value should be uncomparable
to any number so the mapping of the reserved value name to its interna
 value is transparent to users. Again, there's no order defined for
reserved values and hence it should never match if using <,<=,>,>=
operators.

This is actually exactly the same problem as already described in
2f7f6932dcd450ba75fe590aba8c09838d2618dc, but that patch failed for
size field types because of incorrect internal representation used.

With this patch applied, both problematic scenarios mentioned
above are fixed now:

$ vgs -o vg_name,vg_mda_copies -S 'vg_mda_copies < unmanaged'
(blank)

$ lvs -o+read_ahead vg/lvol6 vg/lvol7 -S 'read_ahead > 32k'
  LV    VG   Attr       LSize Pool Origin Rahead
  lvol7 vg   Vwi---tz-k 1.00g pool lvol6  256.00k
2015-04-24 09:48:57 +02:00
Alasdair G Kergon
8853462528 libdm: Add uuid/devno to ioctl failure log message. 2015-04-23 19:26:52 +01:00
Alasdair G Kergon
1906619187 libdm: Add DM_INTERNAL_SUSPEND_FLAG.
Still needs to be reported by dmsetup.
2015-04-23 18:39:04 +01:00
Heinz Mauelshagen
8f472dc12f libdm-deptree: only pass raid0 mapping, not raid0_meta to kernel 2015-04-21 16:47:04 +02:00
Heinz Mauelshagen
4eb00c3f0e raid_manip: add yes_no_prompt() on remove reshaping disks; cleanup 2015-04-17 11:53:02 +02:00
Peter Rajnoha
f32973c78e select: mention { } use in lvm.8 man page and '-S help' properly 2015-04-08 11:14:16 +02:00
Heinz Mauelshagen
927f8dd5df delta_disks=+N starts working on existing striped raid sets 2015-03-25 15:22:20 +01:00
Heinz Mauelshagen
294282463f fix metadata device size calculation 2015-03-16 16:38:17 +01:00
Heinz Mauelshagen
31b64d6fe5 remove superfluous raid4_n segtype 2015-03-10 18:52:55 +01:00
Heinz Mauelshagen
b94705f8af More fixes for striped <-> raidN; add raid0_meta segtype 2015-03-06 19:13:36 +01:00
Heinz Mauelshagen
e1e38f0144 Avoid md_takeover()/md_resize() APIs 2015-03-04 15:52:57 +01:00
Zdenek Kabelac
4c184e9d6b cleanup: drop unused value assign
Dop unused value assignments.

Unknown is detected via other combination
(!linear && !striped).

Also change the log_error() message into a warning,
since the function is not really returning error,
but still keep the INTERNAL_ERROR.

Ret value is always set later.
2015-02-19 14:43:25 +01:00
Peter Rajnoha
123a3383a0 libdm: report: add dm_report_object_is_selected
The new dm_report_object_is_selected fn makes it possible to opt whether the
object reported should be displayed on output or not. Also, in addition to
that, it makes it possible to save the result of selection (either 0 or 1).

So dm_report_object_is_selected is simply  more general form of object
reporting fn - combinations now allow for:

  dm_report_object_is_selected(rh, object, 1, NULL):
  This is exactly the original dm_report_object fn and it's fully equal
  to it.

  dm_report_object_is_selected(rh, object, 0, selected):
  Do not display the result on output, but save info whether the object
  is selected or not in 'selected' variable.

  dm_report_object_is_selected(rh, object, 1, selected):
  Display the result on output (if it passes selection criteria) and save
  whether the object is selected or not in 'selected' variable.

  dm_report_object(rh, object, 0, NULL):
  This combination is not allowed - it will end up with internal error.
  We're either interested in selection status or we want to display the
  result on output or both, but never nothing of the two.
2015-02-10 16:04:38 +01:00
Petr Rockai
d571eab3b2 configure: Look for valgrind.h independently of VALGRIND_POOLS. 2015-02-05 13:50:34 +01: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
Alasdair G Kergon
651549594e libdm-report: Fix order of NULL dm_report check. 2015-01-17 10:50:54 +00:00