mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
alloc: fix raid --alloc anywhere double allocs
If _alloc_parallel_area for raid devices chooses an area already used up, it doesn't notice that it has no space left in it and leaves later code trying to place a zero-length area into the LV. https://bugzilla.redhat.com/832596
This commit is contained in:
parent
2f201d0e5e
commit
2cec4b4a77
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.97 -
|
Version 2.02.97 -
|
||||||
===============================
|
===============================
|
||||||
|
Fix _alloc_parallel_area to avoid picking already-full areas for raid devices.
|
||||||
Use vgchange -aay instead of vgchange -ay in clmvd init script.
|
Use vgchange -aay instead of vgchange -ay in clmvd init script.
|
||||||
Add activation/auto_activation_volume_list to lvm.conf.
|
Add activation/auto_activation_volume_list to lvm.conf.
|
||||||
Add --activate ay to lvcreate, lvchange, pvscan and vgchange.
|
Add --activate ay to lvcreate, lvchange, pvscan and vgchange.
|
||||||
|
@ -1132,9 +1132,13 @@ static int _alloc_parallel_area(struct alloc_handle *ah, uint32_t max_to_allocat
|
|||||||
dm_list_add(&ah->alloced_areas[s], &aa[s].list);
|
dm_list_add(&ah->alloced_areas[s], &aa[s].list);
|
||||||
s -= ah->area_count + ah->parity_count;
|
s -= ah->area_count + ah->parity_count;
|
||||||
}
|
}
|
||||||
|
aa[s].len = (ah->alloc_and_split_meta) ? len - ah->log_len : len;
|
||||||
|
/* Skip empty allocations */
|
||||||
|
if (!aa[s].len)
|
||||||
|
continue;
|
||||||
|
|
||||||
aa[s].pv = pva->map->pv;
|
aa[s].pv = pva->map->pv;
|
||||||
aa[s].pe = pva->start;
|
aa[s].pe = pva->start;
|
||||||
aa[s].len = (ah->alloc_and_split_meta) ? len - ah->log_len : len;
|
|
||||||
|
|
||||||
log_debug("Allocating parallel area %" PRIu32
|
log_debug("Allocating parallel area %" PRIu32
|
||||||
" on %s start PE %" PRIu32 " length %" PRIu32 ".",
|
" on %s start PE %" PRIu32 " length %" PRIu32 ".",
|
||||||
|
Loading…
Reference in New Issue
Block a user