]> sourceware.org Git - lvm2.git/commitdiff
thin: correct ptr test for thin snapshot merging
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Mar 2021 15:23:08 +0000 (16:23 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 10 Mar 2021 00:09:14 +0000 (01:09 +0100)
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

index 0eae74616bdaa5df7429ed56fd782383db1e1312..5adb14506182d6926b67ad6a558f7735766610a0 100644 (file)
@@ -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;
        }
This page took 0.0344100000000001 seconds and 5 git commands to generate.