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;
* 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;
* 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;
}
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))