Blob Blame History Raw
 lib/metadata/lv_manip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 0c54b2c..ef7b58d 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5022,8 +5022,8 @@ static int _lvresize_extents_from_percent(const struct logical_volume *lv,
 		case PERCENT_VG:
 			lp->extents = percent_of_extents(lp->extents, vg->extent_count,
 							 (lp->sign != SIGN_MINUS));
-			if (lp->sign == SIGN_NONE && lp->extents > vg->free_count) {
-				lp->extents = vg->free_count;
+			if ((lp->sign == SIGN_NONE) && (lp->extents > (lv->le_count + vg->free_count))) {
+				lp->extents = lv->le_count + vg->free_count;
 				log_print_unless_silent("Reducing %u%%VG to remaining free space %s in VG.",
 							old_extents,
 							display_size(vg->cmd, (uint64_t)vg->extent_size * lp->extents));