]> sourceware.org Git - lvm2.git/commit
alloc: Fix lvextend failure when varying stripes.
authorAlasdair G Kergon <agk@redhat.com>
Wed, 15 Jul 2015 22:12:54 +0000 (23:12 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 15 Jul 2015 22:12:54 +0000 (23:12 +0100)
commitb93b85378d119e8396b0469574770cd097a988f0
tree44b21493440d5c7f07f6a07f41fea28a38e4c572
parente15db1592642d5eb0a2a76b35882502c541302c7
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
lib/metadata/lv_manip.c
This page took 0.038431 seconds and 5 git commands to generate.