From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - lvdisplay: fix show of merged thin snapshot
Date: Wed, 17 Feb 2021 10:54:35 +0000 (GMT) [thread overview]
Message-ID: <20210217105435.9BAFE3857C60@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=14008ead2a42b4a5db0c81e444f9ea1a05c1a899
Commit: 14008ead2a42b4a5db0c81e444f9ea1a05c1a899
Parent: 3af61d8646765fea95a77618e9bfc7e1c35f7ea2
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Feb 12 15:11:48 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Feb 17 11:21:35 2021 +0100
lvdisplay: fix show of merged thin snapshot
When lvdisplay was executed and thin snaphost has be merged to
thin origin and the operation has been postponed till devices
are closed, command crashed.
Check LV is COW before trying to check snapshot percentage.
---
lib/display/display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/display/display.c b/lib/display/display.c
index a84695393..f0f03c0a5 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -475,7 +475,7 @@ int lvdisplay_full(struct cmd_context *cmd,
snap_active ? "active" : "INACTIVE");
}
snap_seg = NULL;
- } else if ((snap_seg = find_snapshot(lv))) {
+ } else if (lv_is_cow(lv) && (snap_seg = find_snapshot(lv))) {
if (inkernel &&
(snap_active = lv_snapshot_percent(snap_seg->cow,
&snap_percent)))
reply other threads:[~2021-02-17 10:54 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=20210217105435.9BAFE3857C60@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.