mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
indent
This commit is contained in:
parent
f75c11ed27
commit
1a51586c0c
@ -51,8 +51,9 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
|
|
||||||
/* Or if VG tags match */
|
/* Or if VG tags match */
|
||||||
if (!process_lv && tags_supplied &&
|
if (!process_lv && tags_supplied &&
|
||||||
str_list_match_list(tags, &vg->tags))
|
str_list_match_list(tags, &vg->tags)) {
|
||||||
process_all = 1;
|
process_all = 1;
|
||||||
|
}
|
||||||
|
|
||||||
list_iterate_items(lvl, &vg->lvs) {
|
list_iterate_items(lvl, &vg->lvs) {
|
||||||
/* Should we process this LV? */
|
/* Should we process this LV? */
|
||||||
@ -63,8 +64,9 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
|
|
||||||
/* LV tag match? */
|
/* LV tag match? */
|
||||||
if (!process_lv && tags_supplied &&
|
if (!process_lv && tags_supplied &&
|
||||||
str_list_match_list(tags, &lvl->lv->tags))
|
str_list_match_list(tags, &lvl->lv->tags)) {
|
||||||
process_lv = 1;
|
process_lv = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* LV name match? */
|
/* LV name match? */
|
||||||
if (lvargs_supplied &&
|
if (lvargs_supplied &&
|
||||||
@ -206,7 +208,8 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
|
|
||||||
if (!lv_name) {
|
if (!lv_name) {
|
||||||
if (!str_list_add(cmd->mem, &arg_lvnames,
|
if (!str_list_add(cmd->mem, &arg_lvnames,
|
||||||
pool_strdup(cmd->mem, vgname))) {
|
pool_strdup(cmd->mem,
|
||||||
|
vgname))) {
|
||||||
log_error("strlist allocation failed");
|
log_error("strlist allocation failed");
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
@ -248,8 +251,7 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
consistent = 1;
|
consistent = 1;
|
||||||
else
|
else
|
||||||
consistent = 0;
|
consistent = 0;
|
||||||
if (!(vg = vg_read(cmd, vgname, &consistent)) ||
|
if (!(vg = vg_read(cmd, vgname, &consistent)) || !consistent) {
|
||||||
!consistent) {
|
|
||||||
unlock_vg(cmd, vgname);
|
unlock_vg(cmd, vgname);
|
||||||
if (!vg)
|
if (!vg)
|
||||||
log_error("Volume group \"%s\" "
|
log_error("Volume group \"%s\" "
|
||||||
@ -257,9 +259,7 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
else
|
else
|
||||||
log_error("Volume group \"%s\" "
|
log_error("Volume group \"%s\" "
|
||||||
"inconsistent", vgname);
|
"inconsistent", vgname);
|
||||||
if (!vg || !(vg =
|
if (!vg || !(vg = recover_vg(cmd, vgname, lock_type))) {
|
||||||
recover_vg(cmd, vgname,
|
|
||||||
lock_type))) {
|
|
||||||
unlock_vg(cmd, vgname);
|
unlock_vg(cmd, vgname);
|
||||||
if (ret_max < ECMD_FAILED)
|
if (ret_max < ECMD_FAILED)
|
||||||
ret_max = ECMD_FAILED;
|
ret_max = ECMD_FAILED;
|
||||||
@ -349,8 +349,9 @@ static int _process_one_vg(struct cmd_context *cmd, const char *vg_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = process_single(cmd, vg_name, vg, consistent,
|
if ((ret = process_single(cmd, vg_name, vg, consistent,
|
||||||
handle)) > ret_max)
|
handle)) > ret_max) {
|
||||||
ret_max = ret;
|
ret_max = ret;
|
||||||
|
}
|
||||||
|
|
||||||
unlock_vg(cmd, vg_name);
|
unlock_vg(cmd, vg_name);
|
||||||
|
|
||||||
@ -452,8 +453,9 @@ int process_each_pv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
|
|
||||||
list_iterate_items(pvl, &vg->pvs) {
|
list_iterate_items(pvl, &vg->pvs) {
|
||||||
if (tags && !list_empty(tags) &&
|
if (tags && !list_empty(tags) &&
|
||||||
!str_list_match_list(tags, &pvl->pv->tags))
|
!str_list_match_list(tags, &pvl->pv->tags)) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if ((ret = process_single(cmd, vg, pvl->pv, handle)) > ret_max)
|
if ((ret = process_single(cmd, vg, pvl->pv, handle)) > ret_max)
|
||||||
ret_max = ret;
|
ret_max = ret;
|
||||||
}
|
}
|
||||||
@ -769,8 +771,7 @@ static void _create_pv_entry(struct pool *mem, struct pv_list *pvl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pvl->pv->pe_count == pvl->pv->pe_alloc_count) {
|
if (pvl->pv->pe_count == pvl->pv->pe_alloc_count) {
|
||||||
log_err("No free extents on physical volume \"%s\"",
|
log_err("No free extents on physical volume \"%s\"", pvname);
|
||||||
pvname);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,9 +859,6 @@ struct list *create_pv_list(struct pool *mem,
|
|||||||
return list_empty(r) ? NULL : r;
|
return list_empty(r) ? NULL : r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct list *clone_pv_list(struct pool *mem, struct list *pvsl)
|
struct list *clone_pv_list(struct pool *mem, struct list *pvsl)
|
||||||
{
|
{
|
||||||
struct list *r;
|
struct list *r;
|
||||||
|
Loading…
Reference in New Issue
Block a user