1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: check for overprovisioning only once

This commit is contained in:
Zdenek Kabelac 2021-02-07 00:37:37 +01:00
parent 99e168162a
commit eed060f040

View File

@ -5830,10 +5830,6 @@ static int _lvresize_volume(struct logical_volume *lv,
lp->extents - lv->le_count,
pvh, alloc, lp->approx_alloc))
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)
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);
}
/* Check for over provisioning when extended */
if ((lp->resize == LV_EXTEND) && lv_is_thin_type(lv))
pool_check_overprovisioning(lv);
out:
log_print_unless_silent("Logical volume %s successfully resized.",
display_lvname(lv));