diff --git a/WHATS_NEW b/WHATS_NEW index 142c01f5c..c28eb9369 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.14 - =================================== + Fix high-level free space check for partial allocations. Version 2.02.13 - 27th October 2006 =================================== diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 3c9efbd9f..aa47ded58 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -894,10 +894,10 @@ static int _find_parallel_space(struct alloc_handle *ah, alloc_policy_t alloc, /* Is there enough total space? */ free_pes = pv_maps_size(pvms); - if (needed > free_pes) { + if (needed - *allocated > free_pes) { log_error("Insufficient free space: %" PRIu32 " extents needed," - " but only %" PRIu32 " available", needed, - free_pes); + " but only %" PRIu32 " available", + needed - *allocated, free_pes); return 0; }