From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - vdo: resize requires active vdopool volume
Date: Mon, 16 Jan 2023 11:39:16 +0000 (GMT) [thread overview]
Message-ID: <20230116113916.58DE83858D33@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c20f01a0cbb24e8276734a00f26a510cf6daaf21
Commit: c20f01a0cbb24e8276734a00f26a510cf6daaf21
Parent: 2451bc568feb9b3d0cb4d7c15e3c723f4d0c8cc9
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Sun Jan 15 21:27:57 2023 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Jan 16 12:37:40 2023 +0100
vdo: resize requires active vdopool volume
ATM kernel VDO target does not handle resize of inactive VDO LVs
so prevent users corrupting such LVs and require active such LVs.
---
lib/metadata/lv_manip.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 305be8578..cb7f26069 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5954,6 +5954,16 @@ static int _lv_resize_check_used(struct logical_volume *lv)
return 0;
}
+ if (lv_is_vdo(lv) && !lv_is_active(lv)) {
+ log_error("Cannot resize inactive VDO logical volume %s.", display_lvname(lv));
+ return 0;
+ }
+
+ if (lv_is_vdo_pool(lv) && !lv_is_active(lv_lock_holder(lv))) {
+ log_error("Cannot resize inactive VDO POOL volume %s.", display_lvname(lv));
+ return 0;
+ }
+
if (lv_is_external_origin(lv)) {
/*
* Since external-origin can be activated read-only,
reply other threads:[~2023-01-16 11:39 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=20230116113916.58DE83858D33@sourceware.org \
--to=zkabelac@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.