mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Allow mirror images to have more than one segment.
This commit is contained in:
parent
5c9a54e480
commit
c77de77790
@ -1,5 +1,6 @@
|
||||
Version 2.01.11 -
|
||||
==============================
|
||||
Allow mirror images to have more than one segment.
|
||||
Centralise restrictions on LV names.
|
||||
Always insert an intermediate layer for mirrors.
|
||||
Suppress hidden LVs from reports unless --all is given.
|
||||
|
@ -621,7 +621,10 @@ static int _find_parallel_space(struct alloc_handle *ah, alloc_policy_t alloc,
|
||||
if (contiguous && (contiguous_count < ix_offset))
|
||||
break;
|
||||
|
||||
if (ix + ix_offset < ah->area_count + ah->log_count)
|
||||
/* Only allocate log_area the first time around */
|
||||
if (ix + ix_offset < ah->area_count +
|
||||
(ah->log_count && !ah->log_area.len) ?
|
||||
ah->log_count : 0)
|
||||
/* FIXME With ALLOC_ANYWHERE, need to split areas */
|
||||
break;
|
||||
|
||||
@ -630,9 +633,10 @@ static int _find_parallel_space(struct alloc_handle *ah, alloc_policy_t alloc,
|
||||
qsort(areas + ix_offset, ix, sizeof(*areas),
|
||||
_comp_area);
|
||||
|
||||
/* First time around, use smallest area as log_area */
|
||||
if (!_alloc_parallel_area(ah, needed, areas,
|
||||
allocated,
|
||||
ah->log_count ?
|
||||
(ah->log_count && !ah->log_area.len) ?
|
||||
*(areas + ix_offset + ix - 1) :
|
||||
NULL)) {
|
||||
stack;
|
||||
@ -673,7 +677,7 @@ static int _allocate(struct alloc_handle *ah,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (mirrored_pv || (ah->alloc == ALLOC_CONTIGUOUS) || ah->log_count)
|
||||
if (mirrored_pv || (ah->alloc == ALLOC_CONTIGUOUS))
|
||||
can_split = 0;
|
||||
|
||||
if (lv && !list_empty(&lv->segments))
|
||||
|
Loading…
Reference in New Issue
Block a user