mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
allocation: Fix alloc anywhere with parity.
Take account of parity areas with alloc anywhere in _calc_required_extents. Extents beyond area_count were treated incorrectly as mirror logs.
This commit is contained in:
parent
422b3b0fb5
commit
3b989e317f
@ -1,5 +1,6 @@
|
||||
Version 2.02.107 -
|
||||
==================================
|
||||
Take account of parity areas with alloc anywhere in _calc_required_extents.
|
||||
Use proper uint64 casting for calculation of cache metadata size.
|
||||
Better support for nesting of blocking signals.
|
||||
Use only sigaction handler and drop duplicate signal handler.
|
||||
|
@ -1432,8 +1432,7 @@ static int _alloc_parallel_area(struct alloc_handle *ah, uint32_t max_to_allocat
|
||||
struct alloced_area *aa;
|
||||
struct pv_area *pva;
|
||||
|
||||
total_area_count = ah->area_count + alloc_state->log_area_count_still_needed;
|
||||
total_area_count += ah->parity_count;
|
||||
total_area_count = ah->area_count + ah->parity_count + alloc_state->log_area_count_still_needed;
|
||||
if (!total_area_count) {
|
||||
log_warn(INTERNAL_ERROR "_alloc_parallel_area called without any allocation to do.");
|
||||
return 1;
|
||||
@ -1980,7 +1979,7 @@ static uint32_t _calc_required_extents(struct alloc_handle *ah, struct pv_area *
|
||||
* reduce amount we're looking for.
|
||||
*/
|
||||
if (alloc == ALLOC_ANYWHERE) {
|
||||
if (ix_pva >= ah->area_count)
|
||||
if (ix_pva >= ah->area_count + ah->parity_count)
|
||||
required = ah->log_len;
|
||||
} else if (required < ah->log_len)
|
||||
required = ah->log_len;
|
||||
|
Loading…
Reference in New Issue
Block a user