1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

allocation: add default path

Make it obvious for compiler extents is always defined for
valid code path.
This commit is contained in:
Zdenek Kabelac 2014-02-25 09:36:26 +01:00
parent 3e49753e6c
commit e7d189baf7
2 changed files with 7 additions and 1 deletions

View File

@ -3858,6 +3858,9 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volu
case PERCENT_NONE:
extents = lp->extents;
break;
default:
log_error(INTERNAL_ERROR "Unsupported percent type %u.", lp->percent);
return 0;
}
if (lp->percent != PERCENT_NONE) {

View File

@ -363,7 +363,7 @@ static int _update_extents_params(struct volume_group *vg,
} else
lp->pvh = &vg->pvs;
switch(lcp->percent) {
switch (lcp->percent) {
case PERCENT_VG:
extents = percent_of_extents(lp->extents, vg->extent_count, 0);
break;
@ -397,6 +397,9 @@ static int _update_extents_params(struct volume_group *vg,
case PERCENT_NONE:
extents = lp->extents;
break;
default:
log_error(INTERNAL_ERROR "Unsupported percent type %u.", lcp->percent);
return 0;
}
if (lcp->percent) {