From eb9b172ec05ee9ba1f95bf1f1fc79d568ae26e93 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Sun, 27 Feb 2011 01:16:52 +0000 Subject: [PATCH] Fix check for log-only allocation in new alloc normal loop. --- WHATS_NEW | 4 ++-- lib/metadata/lv_manip.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index c045e97f6..233fcc945 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,7 +1,7 @@ Version 2.02.85 - =================================== - Extend normal policy to allow mirror logs on same devs as images if necessary. - Improve cling policy to recognise devs already allocated in the transaction. + Extend normal policy to allow mirror logs on same PVs as images if necessary. + Improve cling policy to recognise PVs already used during the transaction. Improve normal allocation algorithm to include clinging to existing areas. Add allocation/maximise_cling & mirror_logs_require_separate_pvs to lvm.conf. Fix metadata balance code to work with recent changes in metadata handling. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 632f4b022..94374b960 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -1555,9 +1555,9 @@ static int _find_some_parallel_space(struct alloc_handle *ah, const struct alloc (alloc_parms->flags & A_CLING_TO_ALLOCED) && !iteration_count++) || /* Extra iteration needed to fill log areas on PVs already used? */ (alloc_parms->alloc == ALLOC_NORMAL && preferred_count == ix_offset && !ah->mirror_logs_separate && + (ix + preferred_count >= ah->area_count) && (ix + preferred_count < ah->area_count + alloc_state->log_area_count_still_needed) && !log_iteration_count++)); - if (preferred_count < ix_offset && !(alloc_parms->flags & A_CLING_TO_ALLOCED)) return 1;