All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marian Csontos <mcsontos@sourceware.org>
To: lvm-devel@redhat.com
Subject: rhel-9.2.0 - lvextend: fix overprovisioning check for thin lvs
Date: Wed, 11 Jan 2023 11:15:14 +0000 (GMT)	[thread overview]
Message-ID: <20230111111514.5DE273858C52@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=20c6961e37bf6f5010f9d2035dbc1ce03f9b0223
Commit:        20c6961e37bf6f5010f9d2035dbc1ce03f9b0223
Parent:        b01433cdc841133500a0ed4041b9b35838d45e87
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Thu Dec 15 09:57:04 2022 -0600
Committer:     Marian Csontos <mcsontos@redhat.com>
CommitterDate: Thu Dec 22 12:25:45 2022 +0100

lvextend: fix overprovisioning check for thin lvs

18722dfdf4d3 lvresize: restructure code
mistakenly changed the overprovisioning check from applying
to all lv_is_thin_type lvs to only lv_is_thin_pool lvs, so
it no longer applied when extending thin lvs.  The result
was missing warning messages when extending thin lvs.

(cherry picked from commit 4baef0f93f608403b6f2db445e7bf1e80f8f3ee6)
---
 lib/metadata/lv_manip.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 4cdbc19a0..f8eae0447 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -7007,9 +7007,10 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
 	if (lv_is_thin_pool(lv_top)) {
 		if (!update_thin_pool_lv(lv_top, 1))
 			goto_out;
-		if (is_extend)
-			thin_pool_check_overprovisioning(lv_top);
 	}
+	if (lv_is_thin_type(lv_top) && is_extend)
+		thin_pool_check_overprovisioning(lv_top);
+
 	if (lv_main && lv_is_cow_covering_origin(lv_main)) {
 		if (!monitor_dev_for_events(cmd, lv_main, 0, 0))
 			stack;


                 reply	other threads:[~2023-01-11 11:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230111111514.5DE273858C52@sourceware.org \
    --to=mcsontos@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.