mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tidy: else after continue
Similar as with 'else' after 'return' unindent whole block for better readability of code.
This commit is contained in:
parent
0bf836aa14
commit
4ef6cfc882
@ -150,15 +150,15 @@ static int _lv_passes_volumes_filter(struct cmd_context *cmd, const struct logic
|
|||||||
|| str_list_match_list(&cmd->tags,
|
|| str_list_match_list(&cmd->tags,
|
||||||
&lv->vg->tags, NULL))
|
&lv->vg->tags, NULL))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* If supplied tag matches LV or VG tag, activate */
|
/* If supplied tag matches LV or VG tag, activate */
|
||||||
if (str_list_match_item(&lv->tags, str) ||
|
if (str_list_match_item(&lv->tags, str) ||
|
||||||
str_list_match_item(&lv->vg->tags, str))
|
str_list_match_item(&lv->vg->tags, str))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If supplied name is vgname[/lvname] */
|
/* If supplied name is vgname[/lvname] */
|
||||||
|
@ -134,37 +134,35 @@ static int _fill_maps(struct dm_hash_table *maps, struct volume_group *vg,
|
|||||||
if (lv_num == UNMAPPED_EXTENT)
|
if (lv_num == UNMAPPED_EXTENT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
else {
|
lv_num--;
|
||||||
lv_num--;
|
lvm = lvms[lv_num];
|
||||||
lvm = lvms[lv_num];
|
|
||||||
|
|
||||||
if (!lvm) {
|
if (!lvm) {
|
||||||
log_error("Invalid LV in extent map "
|
log_error("Invalid LV in extent map "
|
||||||
"(PV %s, PE %" PRIu32
|
"(PV %s, PE %" PRIu32
|
||||||
", LV %" PRIu32
|
", LV %" PRIu32
|
||||||
", LE %" PRIu32 ")",
|
", LE %" PRIu32 ")",
|
||||||
dev_name(pv->dev), i,
|
dev_name(pv->dev), i,
|
||||||
lv_num, e[i].le_num);
|
lv_num, e[i].le_num);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
le = e[i].le_num;
|
|
||||||
|
|
||||||
if (le >= lvm->lv->le_count) {
|
|
||||||
log_error("logical extent number "
|
|
||||||
"out of bounds");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lvm->map[le].pv) {
|
|
||||||
log_error("logical extent (%u) "
|
|
||||||
"already mapped.", le);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
lvm->map[le].pv = pv;
|
|
||||||
lvm->map[le].pe = i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
le = e[i].le_num;
|
||||||
|
|
||||||
|
if (le >= lvm->lv->le_count) {
|
||||||
|
log_error("logical extent number "
|
||||||
|
"out of bounds");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lvm->map[le].pv) {
|
||||||
|
log_error("logical extent (%u) "
|
||||||
|
"already mapped.", le);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
lvm->map[le].pv = pv;
|
||||||
|
lvm->map[le].pe = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2155,53 +2155,54 @@ static int _match_pv_tags(const struct dm_config_node *cling_tag_list_cn,
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!str_list_match_list(&pv1->tags, tags_to_match, &tag_matched))
|
if (!str_list_match_list(&pv1->tags, tags_to_match, &tag_matched))
|
||||||
continue;
|
continue;
|
||||||
else {
|
|
||||||
if (!pv_tags) {
|
if (!pv_tags) {
|
||||||
if (parallel_pv)
|
if (parallel_pv)
|
||||||
log_debug_alloc("Not using free space on %s: Matched allocation PV tag %s on existing parallel PV %s.",
|
log_debug_alloc("Not using free space on %s: Matched allocation PV tag %s on existing parallel PV %s.",
|
||||||
pv_dev_name(pv1), tag_matched, pv2 ? pv_dev_name(pv2) : "-");
|
pv_dev_name(pv1), tag_matched, pv2 ? pv_dev_name(pv2) : "-");
|
||||||
else
|
else
|
||||||
log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
|
log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
|
||||||
tag_matched, pv_dev_name(pv1), pv2 ? pv_dev_name(pv2) : "-");
|
tag_matched, pv_dev_name(pv1), pv2 ? pv_dev_name(pv2) : "-");
|
||||||
} else
|
} else
|
||||||
log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
|
log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
|
||||||
" from consideration: PV tag %s already used.",
|
" from consideration: PV tag %s already used.",
|
||||||
area_num, pv_dev_name(pv1), pv1_start_pe, tag_matched);
|
area_num, pv_dev_name(pv1), pv1_start_pe, tag_matched);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!str_list_match_item(&pv1->tags, str) ||
|
if (!str_list_match_item(&pv1->tags, str) ||
|
||||||
(tags_to_match && !str_list_match_item(tags_to_match, str)))
|
(tags_to_match && !str_list_match_item(tags_to_match, str)))
|
||||||
continue;
|
continue;
|
||||||
else {
|
|
||||||
if (mem) {
|
if (mem) {
|
||||||
if (!first_tag && !dm_pool_grow_object(mem, ",", 0)) {
|
if (!first_tag && !dm_pool_grow_object(mem, ",", 0)) {
|
||||||
log_error("PV tags string extension failed.");
|
log_error("PV tags string extension failed.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
first_tag = 0;
|
|
||||||
if (!dm_pool_grow_object(mem, str, 0)) {
|
|
||||||
log_error("PV tags string extension failed.");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (!pv_tags) {
|
first_tag = 0;
|
||||||
if (parallel_pv)
|
if (!dm_pool_grow_object(mem, str, 0)) {
|
||||||
log_debug_alloc("Not using free space on %s: Matched allocation PV tag %s on existing parallel PV %s.",
|
log_error("PV tags string extension failed.");
|
||||||
pv2 ? pv_dev_name(pv2) : "-", str, pv_dev_name(pv1));
|
return 0;
|
||||||
else
|
}
|
||||||
log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
|
continue;
|
||||||
str, pv_dev_name(pv1), pv2 ? pv_dev_name(pv2) : "-");
|
|
||||||
} else
|
|
||||||
log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
|
|
||||||
" from consideration: PV tag %s already used.",
|
|
||||||
area_num, pv_dev_name(pv1), pv1_start_pe, str);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pv_tags) {
|
||||||
|
if (parallel_pv)
|
||||||
|
log_debug_alloc("Not using free space on %s: Matched allocation PV tag %s on existing parallel PV %s.",
|
||||||
|
pv2 ? pv_dev_name(pv2) : "-", str, pv_dev_name(pv1));
|
||||||
|
else
|
||||||
|
log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
|
||||||
|
str, pv_dev_name(pv1), pv2 ? pv_dev_name(pv2) : "-");
|
||||||
|
} else
|
||||||
|
log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
|
||||||
|
" from consideration: PV tag %s already used.",
|
||||||
|
area_num, pv_dev_name(pv1), pv1_start_pe, str);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mem)
|
if (mem)
|
||||||
|
Loading…
Reference in New Issue
Block a user