master - alloc: Fix lvextend failure when varying stripes.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b93b85378d119e8396b0469574770cd097a988f0 Commit: b93b85378d119e8396b0469574770cd097a988f0 Parent: e15db1592642d5eb0a2a76b35882502c541302c7 Author: Alasdair G Kergon <[email protected]> AuthorDate: Wed Jul 15 23:12:54 2015 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Wed Jul 15 23:12:54 2015 +0100
alloc: Fix lvextend failure when varying stripes.
A segfault was reported when extending an LV with a smaller number of stripes than originally used. Under unusual circumstances, the cling detection code could successfully find a match against the excess stripe positions and think it had finished prematurely leading to an allocation being pursued with a length of zero.
Rename ix_offset to num_positional_areas and move it to struct alloc_state so that _is_condition() can obtain access to it.
In _is_condition(), areas_size can no longer be assumed to match the number of positional slots being filled so check this newly-exposed num_positional_areas directly instead. If the slot is outside the range we are trying to fill, just ignore the match for now.
(Also note that the code still only performs cling detection against the first segment of the LV.)
--- WHATS_NEW | 3 ++ lib/metadata/lv_manip.c | 72 ++++++++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 32 deletions(-)
WHATS_NEW +3 -0
@@ -1,10 +1,13 @@ Version 2.02.126 - ================================ + Fix alloc segfault when extending LV with fewer stripes than in first seg. Fix handling of cache policy name. Set cache policy before with the first lvm2 cache pool metadata commit. Fix detection of thin-pool overprovisioning (2.02.124). Fix lvmpolld segfaults on 32 bit architectures. + Add lvmlockd lock_args validation to vg_validate. Fix ignored --startstopservices option if running lvmconf with systemd. + Hide sanlock LVs when processing LVs in VG unless named or --all used. Version 2.02.125 - 7th July 2015 ================================
lib/metadata/lv_manip.c +40 -32
189 lines not on this page · raw message