From adee669441991af449abf9c51ecdd784872db894 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Wed, 9 Dec 2009 19:43:39 +0000 Subject: [PATCH] Use more descriptive variable name for temporary layer lv. --- lib/metadata/mirror.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index ec7ba14f2..b76bac6f9 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -502,7 +502,7 @@ static int _remove_mirror_images(struct logical_volume *lv, uint32_t s; struct logical_volume *sub_lv; struct logical_volume *detached_log_lv = NULL; - struct logical_volume *lv1 = NULL; + struct logical_volume *temp_layer_lv = NULL; struct lv_segment *mirrored_seg = first_seg(lv); uint32_t old_area_count = mirrored_seg->area_count; uint32_t new_area_count = mirrored_seg->area_count; @@ -561,11 +561,11 @@ static int _remove_mirror_images(struct logical_volume *lv, * leave the LV as mirrored and let the lvconvert completion * to remove the layer. */ if (new_area_count == 1 && !is_temporary_mirror_layer(lv)) { - lv1 = seg_lv(mirrored_seg, 0); - lv1->status &= ~MIRROR_IMAGE; - lv_set_visible(lv1); + temp_layer_lv = seg_lv(mirrored_seg, 0); + temp_layer_lv->status &= ~MIRROR_IMAGE; + lv_set_visible(temp_layer_lv); detached_log_lv = detach_mirror_log(mirrored_seg); - if (!remove_layer_from_lv(lv, lv1)) + if (!remove_layer_from_lv(lv, temp_layer_lv)) return_0; lv->status &= ~MIRRORED; lv->status &= ~MIRROR_NOTSYNCED; @@ -616,9 +616,9 @@ static int _remove_mirror_images(struct logical_volume *lv, * As it's now detached from mirrored_seg->lv we must resume it * explicitly. */ - if (lv1) { - if (!resume_lv(lv1->vg->cmd, lv1)) { - log_error("Problem resuming temporary LV, %s", lv1->name); + if (temp_layer_lv) { + if (!resume_lv(temp_layer_lv->vg->cmd, temp_layer_lv)) { + log_error("Problem resuming temporary LV, %s", temp_layer_lv->name); return 0; } @@ -647,7 +647,7 @@ static int _remove_mirror_images(struct logical_volume *lv, return_0; } - if (lv1 && !_delete_lv(lv, lv1)) + if (temp_layer_lv && !_delete_lv(lv, temp_layer_lv)) return_0; if (detached_log_lv && !_delete_lv(lv, detached_log_lv))