mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
RAID: Fix broken allocation policies for parity RAID types
A previous commit (b6bfddcd0a830d0c9312bc3ab906cb3d1b7a6dd9) which was designed to prevent segfaults during lvextend when trying to extend striped logical volumes forgot to include calculations for RAID4/5/6 parity devices. This was causing the 'contiguous' and 'cling_by_tags' allocation policies to fail for RAID 4/5/6. The solution is to remember that while we can compare ah->area_count == prev_lvseg->area_count for non-RAID, we should compare (ah->area_count + ah->parity_count) == prev_lvseg->area_count for a general solution.
This commit is contained in:
parent
6553f86818
commit
5ded7314ae
@ -1,5 +1,6 @@
|
||||
Version 2.02.103 -
|
||||
======================================
|
||||
Fix contiguous & cling allocation policies for parity RAID. (2.02.100)
|
||||
Set use_lvmetad=0 on lvmconf --enable-cluster, reset to default on --disable-cluster.
|
||||
Don't install separate command symlink in binary directory for 'lvm devtypes'.
|
||||
Add seg_size_pe field to reports.
|
||||
|
@ -1200,7 +1200,8 @@ static void _init_alloc_parms(struct alloc_handle *ah, struct alloc_parms *alloc
|
||||
alloc_parms->extents_still_needed = extents_still_needed;
|
||||
|
||||
/* Only attempt contiguous/cling allocation to previous segment areas if the number of areas matches. */
|
||||
if (alloc_parms->prev_lvseg && (ah->area_count == prev_lvseg->area_count))
|
||||
if (alloc_parms->prev_lvseg &&
|
||||
((ah->area_count + ah->parity_count) == prev_lvseg->area_count))
|
||||
alloc_parms->flags |= A_AREA_COUNT_MATCHES;
|
||||
|
||||
/* Are there any preceding segments we must follow on from? */
|
||||
|
Loading…
x
Reference in New Issue
Block a user