mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix detection of smallest area in _alloc_parallel_area() for cling policy.
This commit is contained in:
parent
699b275aea
commit
948ee3e396
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.17 -
|
Version 2.02.17 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix detection of smallest area in _alloc_parallel_area() for cling policy.
|
||||||
Add manpage entry for clvmd -T
|
Add manpage entry for clvmd -T
|
||||||
Fix gulm operation of clvmd, including a hang when doing lvchange -aey
|
Fix gulm operation of clvmd, including a hang when doing lvchange -aey
|
||||||
Fix hang in clvmd if a pre-command failed.
|
Fix hang in clvmd if a pre-command failed.
|
||||||
|
@ -628,17 +628,17 @@ static int _alloc_parallel_area(struct alloc_handle *ah, uint32_t needed,
|
|||||||
struct pv_area **areas,
|
struct pv_area **areas,
|
||||||
uint32_t *ix, struct pv_area *log_area)
|
uint32_t *ix, struct pv_area *log_area)
|
||||||
{
|
{
|
||||||
uint32_t area_len, smallest, remaining;
|
uint32_t area_len, remaining;
|
||||||
uint32_t s;
|
uint32_t s;
|
||||||
struct alloced_area *aa;
|
struct alloced_area *aa;
|
||||||
|
|
||||||
remaining = needed - *ix;
|
remaining = needed - *ix;
|
||||||
area_len = remaining / ah->area_multiple;
|
area_len = remaining / ah->area_multiple;
|
||||||
|
|
||||||
smallest = areas[ah->area_count - 1]->count;
|
/* Reduce area_len to the smallest of the areas */
|
||||||
|
for (s = 0; s < ah->area_count; s++)
|
||||||
if (area_len > smallest)
|
if (area_len > areas[s]->count)
|
||||||
area_len = smallest;
|
area_len = areas[s]->count;
|
||||||
|
|
||||||
if (!(aa = dm_pool_alloc(ah->mem, sizeof(*aa) *
|
if (!(aa = dm_pool_alloc(ah->mem, sizeof(*aa) *
|
||||||
(ah->area_count + (log_area ? 1 : 0))))) {
|
(ah->area_count + (log_area ? 1 : 0))))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user