mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Extend allocation areas to avoid overflow with contiguous with other PVs.
Another pvmove fix.
This commit is contained in:
parent
47b59176e0
commit
b79c897ea1
@ -1,5 +1,6 @@
|
||||
Version 2.02.00 -
|
||||
===================================
|
||||
Extend allocation areas to avoid overflow with contiguous with other PVs.
|
||||
Stop lvcreate attempting to wipe zero or error segments.
|
||||
Added new lvs table attributes.
|
||||
Separated out activation preload.
|
||||
|
@ -718,7 +718,7 @@ static int _find_parallel_space(struct alloc_handle *ah, alloc_policy_t alloc,
|
||||
already_found_one = 1;
|
||||
}
|
||||
|
||||
areas[ix + ix_offset -1] = pva;
|
||||
areas[ix + ix_offset - 1] = pva;
|
||||
|
||||
break; /* Next PV */
|
||||
}
|
||||
@ -811,6 +811,11 @@ static int _allocate(struct alloc_handle *ah,
|
||||
areas_size = ah->area_count + ah->log_count;
|
||||
}
|
||||
|
||||
/* Upper bound if none of the PVs in prev_lvseg is in pvms */
|
||||
/* FIXME Work size out properly */
|
||||
if (prev_lvseg)
|
||||
areas_size += prev_lvseg->area_count;
|
||||
|
||||
/* Allocate an array of pv_areas to hold the largest space on each PV */
|
||||
if (!(areas = dm_malloc(sizeof(*areas) * areas_size))) {
|
||||
log_err("Couldn't allocate areas array.");
|
||||
|
@ -309,7 +309,7 @@ static int _add_target_line(struct dev_manager *dm, struct dm_pool *mem,
|
||||
}
|
||||
|
||||
done:
|
||||
return add_areas_line(dm, seg, node, start_area, seg->area_count);
|
||||
return add_areas_line(dm, seg, node, start_area, area_count);
|
||||
}
|
||||
|
||||
static int _target_present(void)
|
||||
|
Loading…
Reference in New Issue
Block a user