From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - writecache: don't pvmove device used by writecache
Date: Wed, 2 Jun 2021 16:14:04 +0000 (GMT) [thread overview]
Message-ID: <20210602161404.66D4C3955408@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e7f107c24666c8577f30e530b74f1ce0347e459b
Commit: e7f107c24666c8577f30e530b74f1ce0347e459b
Parent: 247f69f9aafe731ef85268da1e6ce817295b265d
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Jun 2 11:12:20 2021 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Jun 2 11:12:20 2021 -0500
writecache: don't pvmove device used by writecache
The existing check didn't cover the unusual case where the
cachevol exists on the same device as the origin LV.
---
tools/pvmove.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/pvmove.c b/tools/pvmove.c
index da635a662..bb372f7dc 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -387,6 +387,15 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
return NULL;
}
+ if (lv_is_writecache(lv)) {
+ struct logical_volume *lv_cachevol = first_seg(lv)->writecache;
+ if (lv_is_on_pvs(lv_cachevol, source_pvl)) {
+ log_error("Unable to move device used for writecache cachevol %s.", display_lvname(lv_cachevol));
+ return NULL;
+ }
+
+ }
+
if (lv_is_raid(lv) && lv_raid_has_integrity(lv)) {
log_error("Unable to pvmove device used for raid with integrity.");
return NULL;
reply other threads:[~2021-06-02 16:14 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=20210602161404.66D4C3955408@sourceware.org \
--to=teigland@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.