From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - thin: correct ptr test for thin snapshot merging
Date: Wed, 10 Mar 2021 00:36:27 +0000 (GMT) [thread overview]
Message-ID: <20210310003627.583B73858038@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=413a114cdbb1fa0c198fb9a3f71d47dcb3d5e28d
Commit: 413a114cdbb1fa0c198fb9a3f71d47dcb3d5e28d
Parent: b2616cd45670866b4f5b46675fe3f1563eea3415
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Tue Mar 9 16:23:08 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Mar 10 01:09:14 2021 +0100
thin: correct ptr test for thin snapshot merging
The correct test needs to actually check 'lv->snapshot' is not NULL,
so the 'find_snapshot()' can work.
Test lv_is_snapshot was actually irrelavant for this case.
Also initialize device_id.
---
tools/lvconvert_poll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lvconvert_poll.c b/tools/lvconvert_poll.c
index 0eae74616..5adb14506 100644
--- a/tools/lvconvert_poll.c
+++ b/tools/lvconvert_poll.c
@@ -174,9 +174,9 @@ progress_t poll_thin_merge_progress(struct cmd_context *cmd,
const char *name __attribute__((unused)),
struct daemon_parms *parms)
{
- uint32_t device_id;
+ uint32_t device_id = 0;
- if (!lv_thin_device_id(lv, &device_id) && !lv_is_snapshot(lv)) {
+ if (!lv_thin_device_id(lv, &device_id) || !lv->snapshot) {
stack;
return PROGRESS_CHECK_FAILED;
}
reply other threads:[~2021-03-10 0:36 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=20210310003627.583B73858038@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.