From 5154054af43ae2e6592c8aeb7f79b96d47f4bb5d Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 29 Jun 2023 23:19:09 +0200 Subject: [PATCH] snapshot: no error when extending above max size When lvm2 calculates the maximal usable COW size and crops the user requested size to this value, don't return the error result from the 'lvextend' operation. We already apply the same logic when resizing thin-pool beyond the supported maximal size. FIXME: The return code error logic here is somewhat fuzzy. --- lib/metadata/lv_manip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index a4593c969..4206ed20a 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -5586,6 +5586,7 @@ static int _lvresize_adjust_extents(struct logical_volume *lv, seg_size = lp->extents - existing_logical_extents; // Recalculate if (lp->extents == existing_logical_extents) { /* Signal that normal resizing is not required */ + lp->size_changed = 1; return 1; } }