mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
thin: check for overprovisioning only once
This commit is contained in:
parent
99e168162a
commit
eed060f040
@ -5830,10 +5830,6 @@ static int _lvresize_volume(struct logical_volume *lv,
|
|||||||
lp->extents - lv->le_count,
|
lp->extents - lv->le_count,
|
||||||
pvh, alloc, lp->approx_alloc))
|
pvh, alloc, lp->approx_alloc))
|
||||||
return_0;
|
return_0;
|
||||||
/* Check for over provisioning only when lv_extend() passed,
|
|
||||||
* ATM this check does not fail */
|
|
||||||
else if (!pool_check_overprovisioning(lv))
|
|
||||||
return_0;
|
|
||||||
|
|
||||||
if (old_extents == lv->le_count)
|
if (old_extents == lv->le_count)
|
||||||
log_print_unless_silent("Size of logical volume %s unchanged from %s (%" PRIu32 " extents).",
|
log_print_unless_silent("Size of logical volume %s unchanged from %s (%" PRIu32 " extents).",
|
||||||
@ -6126,6 +6122,11 @@ int lv_resize(struct logical_volume *lv,
|
|||||||
|
|
||||||
backup(vg);
|
backup(vg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for over provisioning when extended */
|
||||||
|
if ((lp->resize == LV_EXTEND) && lv_is_thin_type(lv))
|
||||||
|
pool_check_overprovisioning(lv);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
log_print_unless_silent("Logical volume %s successfully resized.",
|
log_print_unless_silent("Logical volume %s successfully resized.",
|
||||||
display_lvname(lv));
|
display_lvname(lv));
|
||||||
|
Loading…
Reference in New Issue
Block a user